Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - reis

Pages: [1]
1
NGUI 3 Support / Re: camera culling mask - show and hide UI
« on: June 16, 2014, 09:28:23 AM »
Thanks Araon, I know its a basic C# question thats why I said at the bottom I'm just unsure what the camera was called when calling it from a static function - Thank you for your help!


2
NGUI 3 Support / camera culling mask - show and hide UI
« on: June 16, 2014, 06:28:27 AM »
Hi guys,

I'm just looking for a simple way to be able to take a photo without the UI being in the way.
I'm using Prime 31 plugin with NGUI.

I know I could use the NGUI Camera's culling mask, onClick set the culling mask to 0 then turn it back on.
I'm just unsure how to go about it as I cant use a non-static object to select camera as the take photo code is in a coroutine as I get the error

Quote
An object reference is required to access non-static member

I have got this so far,

  1. public Camera hideUI;
  2.  
  3. public static IEnumerator TakeScreenshot(MonoBehaviour mono )
  4.  {
  5.  if( Application.platform == RuntimePlatform.IPhonePlayer )
  6.                         {
  7.  
  8.                            int previousMask = hideUI.cullingMask;
  9.  
  10.                            hideUI.cullingMask = 0;
  11.  
  12.                            //take screenshot code from prime31
  13.  
  14.                            hideUI.cullingMask = previousMask;
  15.                      }
  16.  
  17.  
  18.  

I'm just a bit unsure how I find the camera's name that I need to refer to - unless theres a better way around this please let me know! Thanks guys.

3
NGUI 3 Support / Re: TweenAlpha for 2 seconds?
« on: March 07, 2014, 09:05:40 AM »
I fixed this issue by changing "if already playing" to Restart.

4
NGUI 3 Support / TweenAlpha for 2 seconds?
« on: March 07, 2014, 07:32:10 AM »
Hi guys,
Since the new update I'm unsure how to use NGUI to tween the alpha to disappear then reappear the UI.

Currently I've added UIPlay Tween to my button and TweenAlpha to my object, then assigning Tween Target on my button to the object.

Using the graph on TweenAlpha I've created it to go from 1 to 0, (few seconds gap) 0 to 1. But it's not working as I'd like.

Any suggestions? Thanks in advance!


5
NGUI 3 Support / Re: screen ratios make UI go werid - iphone, ipad
« on: December 09, 2013, 04:19:11 AM »
Sorry about that,

The issue is the UI isn't changing for different screen sizes, To update the screen size, I have to run Unity - play twice to update to the current screen size. As the first once offsets all the UI in the Y axis for some reason. I can provide screenshots if you like.

This has been partly fixed by un-ticking, "run only once" on the anchors.
I guess an alternative way around this would be to create a UI for each iOS screen size?

Hope this is more clear sorry.

6
NGUI 3 Support / screen ratios make UI go werid - iphone, ipad
« on: December 06, 2013, 11:12:33 AM »
hi,
All the automatic screen sizes do happen, but I have to click play on my Unity preview twice before they sync into the correct places, I've used Anchors too. But when playing on the devices, they work on some devices, for example my most current build works on iphone 4 and ipad 2 - however the build before that, the only difference I did was click play twice to update the screen size in iphone 4 - the UI was offset in the Y axis.

Can suggestions please as the UI keeps moving up and down in the Y axis? Thanks!

7
NGUI 3 Support / NGUI 2D UI is incorrect ??
« on: December 06, 2013, 05:14:28 AM »
Hi Guys,
Im having a little issue with NGUI on my Unity project its fine but when building it to a device the whole NGUI UI is offset only in the Y axis about 10% upwards, does anyone know a solution for this?

I'd appreciate your help!
Thanks in advance!

Reis.

8
NGUI 3 Support / Re: Animate OnPress UIButton Alpha for 2 seconds
« on: September 23, 2013, 03:45:36 AM »
Great thanks Aron, Although I would like to figure out how to use it on this version? sorry if it causes any inconvenience!
Also I'd like to take this chance to say great work on the NGUI.

9
NGUI 3 Support / Re: Issues with Vuforia
« on: September 20, 2013, 09:06:02 AM »
The UI looks great without parenting it to the AR Camera, is there a reason why you need to do this?
I've parented it just for the sake of you saying it but would like to know a reason.

Thanks!

10
NGUI 3 Support / Re: Animate OnPress UIButton Alpha for 2 seconds
« on: September 20, 2013, 04:27:51 AM »
Hi, thank you for your support.

I'm still running into some difficulties as I can't figure how to correctly use tween alpha.

I've added TweenAlpha to the objects I want to tween. And added theUIButton Tween to the button.

Then assigning the tween target inside the UIButton Tween to the object that has TweenAlpha script on. Then in the Event Receiver of the UIButton Tween is assigned to the object with the Alpha Tween on.

PS: To have multiple objects with the same tween I've added them into the same group. The butted pressed to hide all the buttons for 3 seconds then reappear, also needs to hide.

Thanks again.
R.

11
NGUI 3 Support / Animate OnPress UIButton Alpha for 2 seconds
« on: September 19, 2013, 04:51:50 AM »
Hi Guys,
I'm really new to C# and learning as I develop this project which is a big learning curve for me.
So please excuse me if I don't understand.

I Want to basically click a UIButton, and animate the alpha channel to hide then reappear after a duration of time.

Also, would it be possible to tween the animation so that it hides quickly and reappears slowly ( EaseIn ) ?
I  am guessing this would have to somewhere include

UIButtonPlayAnimation with a something like a vector3 ( 0,0,0 ) out and in to create the fast fade out and slow ease in?
Or is my current thinking incorrect? But you're able to see my logic in it? ^_^

Thanks in advance x

12
NGUI 3 Support / Re: Issues with Vuforia
« on: September 18, 2013, 06:45:53 AM »
Usually helps if I actually assign the take photo script to the button...

13
NGUI 3 Support / Re: Issues with Vuforia
« on: September 18, 2013, 06:18:37 AM »
This is a long shot but im having some troubles integrating Prime31 Etceteria plugin with Vuforia and NGUI? all my assets are correct and I'm trying to call, take screenshot.

I have managed to get the bezel wheel active, In my previous build I was using UIToolkit and I take screenshot method was working then. I've only copied and pasted the code but when I click on the button on the iPad the screen goes black for a split second then returns to normal view. And no photo has been saved.

Know much on this subject? :)

Thanks for your help!

14
NGUI 3 Support / Re: Issues with Vuforia
« on: September 18, 2013, 03:52:29 AM »
Really appreciate the in-depth response. It's definitely a link I wont be getting rid of any time soon if I run into the same error. I Managed to create what I was after in the end by using the UI Wizard, and with a few alterations from the 2scene camera video for NGUI.

If I find this is insufficient for building to the device then I shall be turning straight to this answer. Thanks again.


15
NGUI 3 Support / Issues with Vuforia
« on: September 17, 2013, 10:42:39 AM »
Hi guys,

I'm currently having issues with Vuforia and NGUI.
I've imported all the demo scene into my current project and done the following




Hierarchy:

AR Camera - Culling Mask - NGUI la[size=78%]yer, Layer "Default"[/size][/i]


UI Root -UIRoot Script and changed the Unity layer to NGUI

  UIRoot> Camera - UICamera Script, Clear Flags to "Depth only" Culling mask to "NGUI Layer" Projection Orthographic, Size 1 and          Depth 1. Layer "NGUI Layer"

      UIRoot> Camera> Anchor - UIAnchor Script, Side "Bottom".  Layer "NGUI Layer"

            UIRoot> Camera> Anchor> Panel - UIPanel Script, Depth sort and Panel Tool checked. Layer, "Default"

                 UIRoot> Camera> Anchor> Panel > Sprite - Layer, "Default"


The anchor doesn't respect the screen size,
Also I can move the UI Root game object, and in my game preview window the NGUI will move off screen too.


Any suggestions?
Thanks in advance.







Pages: [1]