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.


Topics - DarJam

Pages: [1]
1
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

2
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... :'(

3
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

4
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]