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

Pages: [1] 2 3
1
TNet 3 Support / Re: TNET on raspberry pi
« on: November 13, 2015, 03:11:03 PM »
Oh.. and does TNET support Apple NAT-PMP yet?  Thanks

2
TNet 3 Support / TNET on raspberry pi
« on: November 13, 2015, 02:45:27 PM »
I think the answer to my question is "yes", but does TNET compile and run properly on a Raspberry Pi using mono?  I want to make a remote camera with a raspberry pi that uploads pictures and data to a server (the server may or may not run on a raspberry pi also).

Thanks

3
NGUI 3 Support / Re: Text size in UITextList
« on: January 08, 2014, 09:47:41 PM »
Regardless of the size of the bitmapped font.. is there no way to scale the text anymore?  No way to use a bitmapped font in a UITextList?  Creating multiple sized bitmapped fonts is not realistic.  I'm able to specify the size for a dynamic font.  Is that the only option?

Thanks

4
NGUI 3 Support / Text size in UITextList
« on: January 07, 2014, 06:57:27 PM »
I'm trying to do a chat window. I have a bitmapped font that I think by default is 16 high according to the widget tool, but dimensions always default it to 90 pixels high.  I set up everything just like the chat example but my text is HUGE.  How do I get it to use smaller text?

5
NGUI 3 Support / Re: Discrepancy between scenes with new anchoring system
« on: December 28, 2013, 11:56:42 PM »
I don't think this is fixed, or something is wrong, or I don't know what I'm doing.  I have a UI Root (2D) saved to a prefab with 3.08.  Offset checked in UIPanel and I'm having a hell of a time trying to position text fields to corners of the screen.  I get it set perfectly.  Click apply on the prefab and it reverts back to some other position.  Overlflow *ALWAYS* resets to ShrinkContent.  I really don't understand what's going on with anchoring text labels now, and I've been using NGUI since 2.1 or so.  It used to be easy, now unfortunately, I'm finding it very unintuitive and frustrating.  :(

I should mention I'm using the unified anchors.  Switching back to UIAnchor allows me to position it, safe the prefab and retain the Overflow mode ResizeFreely

6
TNet 3 Support / Re: Custom Object Creation functions (1.8.0+)
« on: October 10, 2013, 11:04:25 PM »
Think I answered my own question.. keep a static list around and update it when creating/removing players using tno.ownerID for lookup.

  1. public class PlayerID {
  2.         public PlayerID( GameObject _go, int _id ) {
  3.                 go = _go;
  4.                 id = _id;
  5.         }
  6.         public GameObject       go;
  7.         public int                      id;
  8. }
  9. private static BetterList<PlayerID> players = new BetterList<PlayerID>();
  10.        
  11. public static GameObject Find( int objID ) {
  12.         for ( int i = 0; i < players.size; i++ ) {
  13.                 if ( players[i].id == objID ) {
  14.                         return players[i].go;
  15.                 }
  16.         }
  17.         return null;
  18. }
  19.  

7
TNet 3 Support / Re: Custom Object Creation functions (1.8.0+)
« on: October 10, 2013, 09:59:49 PM »
Nice stuff...

Say I want to launch off a projectile with this code... and I want to pass in the GameObject owner of the projectile so that I can turn off collision between the owner and the projectile.  I can't serialize a GameObject for this, how would you go about doing that?

thanks

8
That said, you can create private RFCs in the derived class and it works okay.  It's a nice "gotcha" to be aware of and hopefully someone having the same problem will run across this post.

9
This was a frustrating one..  RFC's defined in a base class won't be found by RebuildMethodList() if they are not marked public or protected

So given a class hierarchy like:

public class ObjBase : Monobehaviour { }
public class GameObj : ObjBase { }

For whatever reason type.GetMethods() in TNObject.RebuildMethodList() won't find the following RFC methods if they are defined in ObjBase instead of in GameObj

[RFC] void OnSync( Vector3 _pos ) {
   thisTransform.position = _pos;
}
(or)

[RFC(1)] void OnSync( Vector3 _pos ) {
   thisTransform.position = _pos;
}

the fix is to make them protected...  Not sure if this is a bug in mono or what.

10
NGUI 3 Support / Re: Is there a guide for creating custom widgets?
« on: August 14, 2013, 01:50:05 PM »
So no guide huh?

There was mention of one in the forums, but I couldn't find it.  I'll just look at the sprite code.

11
NGUI 3 Support / Re: Is there a guide for creating custom widgets?
« on: August 13, 2013, 01:11:39 PM »
Well I planned on using the same borders set up for a sliced sprite, and I only need to stretch out the borders to the edges of the screen, so I don't really have to define those in the inspector.

Consider it like a spotlight moving around on the screen (although I'm not planning on it moving)

Thanks

12
NGUI 3 Support / Is there a guide for creating custom widgets?
« on: August 13, 2013, 12:27:47 PM »
I want to create a custom widget.. one in which the sprite is positioned somewhere on the screen, and then the borders of the sprite are stretched to the edges of the screen.  Sort of the reverse of a sliced sprite.  I've attached an image of what I want to do.  The middle must stay in the sprites position, and the borders must adjust to the edges of the screen.

I've tried a series of sprites with anchors and stretches and there always seems to be some overlap or gap between the sprites, especially when designing in one resolution and then running it on another.

thanks


13
I'll look at the TweenTransform.. thanks

14
It fails in that with a wider screened device, the sprite backgrounds are left on screen because the animation didn't move them all the way off the screen.  Basing the animation on the largest screen size available right now isn't really the best solution I think.

thanks

15
Yes, I'm animating the parent(s).

top panel object <animation object here>
    group0 <empty game object that has it's transform position animated, no UIStretch or UIAnchor>
        child0
        child1
        child2
    group1 <same as above>
    ...
    groupx

The animation only translates the group0...groupX objects based on the screen width for iphone5.. so when you play it on an iPad, they don't animate all the way off screen.  I need to know what's the best way to get this to work.  I could write a little script for each group_ object, expose a value that can be animated from 0 -> 1 and then position them according to screen width?  or is there an easier way?

thanks

Pages: [1] 2 3