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 - DarJam

Pages: [1]
1
NGUI 3 Support / Re: Prefab losing target - specifying parameter ?
« on: November 03, 2014, 04:39:05 AM »
OK, this type of question is answered on other posts.My problem was a table of game objects with variable information and size and when clicked i wanted it to pass a message to a higher object and i needed to know which one was tapped. I found this worked well.

  1. ...
  2. EventDelegate del = new EventDelegate(this, "FixturesPressed");
  3. del.parameters[0] = new EventDelegate.Parameter(go, "gameObject");
  4. table[i].GetComponent<UIButton>().onClick.Add ( del );
  5. ...
  6. public void FixturesPressed (GameObject go)
  7. {
  8. Debug.Log(go.name);
  9. }
  10.  

2
NGUI 3 Support / Prefab losing target - specifying parameter ?
« on: November 02, 2014, 05:53:05 PM »
My prefab containing UIButton and onClick notify with target where i want the object clicked in one of many to be passed to a target. Unity removes the on click information from the prefab after the first use. This was answered on another message but that did not include a parameter. How do i code it with a parameter?

  1. table[i] = (GameObject) Instantiate( Resources.Load( "Prefabs/NGUI/Table/tabledef_basic"));
  2. EventDelegate.Add( table[i].GetComponent<UIButton>().onClick, FixturesPressed);    
  3. EventDelegate.Parameter = table[i];
  4.  
  5. public void FixturesPressed(GameObject go){
  6.    Debug.Log ( go.name + " clicked!");
  7. }
  8.  

The compiler generates

error CS1502: The best overloaded method match for `EventDelegate.Add(System.Collections.Generic.List<EventDelegate>, EventDelegate)' has some invalid arguments
Error CS1503: Argument `#2' cannot convert `method group' expression to type `EventDelegate'

It works fine without a parameter but i need a parameter. Can anyone help ? Thanks

3
TNet 3 Support / TNet iOS Pro Only ???
« on: April 22, 2013, 04:07:15 PM »
Hello,
I just tried to build some of the examples of TNet to my iPhone but got the following msg:

Error building Player: SystemException: System.Net.Sockets are supported only on Unity iOS Pro. Referenced from assembly 'Assembly-CSharp'.

Does this mean what i think and that i cannot use TNet unless i have Pro version ? Pls tell me it's not true... :'(

4
TNet 3 Support / New to TNet, authoritative + turn based ?
« on: April 12, 2013, 02:10:26 PM »
I just bought TNet and got a few of the examples running. Looks awesome and importantly seems very fast.

For my game i need to build an authoritative server with turn based gameplay for iOS/Android. The server needs to keep score and instruct a player it's his turn and everyone else can see the shot and server keeps changing player until everyone has shot then it decides a winner.

Can anyone provide some guidance about how i might get going with this ? It seems to me that Example 3 seemed the best starting point.


Many Thanks
Darryl

5
NGUI 3 Support / Re: iOS scaling
« on: February 21, 2013, 07:16:47 AM »
Thank you for the suggestion, that is what the problem was - it was set to fastest. I had no idea this menu option even existed! I've set it to Good quality and looks much better.

6
NGUI 3 Support / Re: iOS scaling
« on: February 20, 2013, 06:00:36 PM »
Good call, My two screenshots show: IMG_039 shows the output from Unity Play, the second shows the output on my iPad. The quality is noticeably worse on the iPad. Why is this so ?

My settings on UIRoot were: Manual Height =1536, Min Height=320, Max Height =1536, Scaling Style=FixedSize

I set these to all 1536 and 2048, changed scaling style to FixedSizeOnMobiles but it makes no difference to what values i set, it still looks rubbish ! My game will be portrait mode only.

Have i got these values wrong ? Please help ! Thanks.

7
NGUI 3 Support / iOS scaling
« on: February 20, 2013, 11:14:24 AM »
Hi, I'm new to NGUI and i am experimenting with it for menus for my iOS games. I have followed the Basic video as a guide. When i run it in Unity player it looks good. When i compile to Xcode and run it on the device (iPad and iPhone3GS) it looks poor and as though it's been scaled upwards-and is grainy.

On my UIRoot I do not have scale automatically checkbox, I have "ScalingHeight", "Manual Height", "Minimum Height", "Maximum Height". I have tried changing these values but nothing seems to affect the final product. The quality is slightly better than on Unity Remote.

What am i doing wrong ?


Pages: [1]