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

Pages: [1]
1
TNet 3 Support / GameServer included on client build?
« on: September 27, 2014, 05:37:59 AM »
Hey, I was decompiling my standalone windows build's dlls, and notice that the TNet GameServer codes are exposed on my client build. Is this supposed to happen?

The project im working with is dedicated server -> clients, which i dont want any of my clients host their own server. I don't want them to decompile my scripts steals the server code and put up their own private server.

2
NGUI 3 Support / how to detect right click on ngui object
« on: September 04, 2014, 05:52:18 AM »
hey, how do you detect if user performs right click on my scrollview items? at the moment I'm using this

  1.     public void OnClick()
  2.     {
  3.         if (Input.GetMouseButton(1))
  4.         {
  5.             Debug.Log("Right click on" + thisDisplayname);
  6.         }
  7.         Debug.Log(thisDisplayname);
  8.     }
  9.  

When I left click on my item it works fine, but it doesnt detect my right click, I also browsed somewhere and tried OnRightClick, but it doesnt trigger my debug log

3
NGUI 3 Support / Re: How do you use tooltip?
« on: August 30, 2014, 01:47:06 AM »
Thank you, that solved it  :)

4
NGUI 3 Support / How do you use tooltip?
« on: August 29, 2014, 02:15:45 PM »
Hey, is there a short tutorial on how to implement tooltip?
I've been tinkering around and confused. I want a tooltip appear when users hover to sprite and not moving cursor. So I put this on the sprite

  1. public void OnTooltip()
  2.     {
  3.         Debug.Log("triggered");
  4.     }

it does nothing.
need help Thanks!

5
NGUI 3 Support / How to keep UITexture in fixed size
« on: August 25, 2014, 11:48:08 AM »
Hey, I have UITexture, which the content are from DownloadTexture. Should be placed on this avatar box, anchored


when I run, it downloads the image, and placed it on the box as it is so when the size is big, it become like this


How do I make it so that whatever size the downloaded image is, it must not oversize the avatar box,

6
NGUI 3 Support / Re: Texture doesn't load properly for some reason
« on: August 23, 2014, 09:21:07 PM »
thank you, that's fixed it, changing the compression, and wait till the www has done downloading the data

7
NGUI 3 Support / Texture doesn't load properly for some reason
« on: August 23, 2014, 02:30:06 PM »
Hello, I'm currently stuck on this part. Basically I want this box to load image from url

This is my snippet
  1. void Start () {
  2.         StartCoroutine(SetAvatar());
  3.         }
  4.  
  5. IEnumerator SetAvatar()
  6.     {
  7.         while (true)
  8.         {
  9.             if (avatarLoaded == false && PlayerObjectScript.display_pic != "")
  10.             {
  11.                 Texture2D ava = new Texture2D(50, 50, TextureFormat.DXT1, false);;
  12.                 var www = new WWW(PlayerObjectScript.display_pic);
  13.                 www.LoadImageIntoTexture(ava);
  14.  
  15.                 this.GetComponent<UITexture>().mainTexture = ava;
  16.                 avatarLoaded = true;
  17.             }
  18.             else
  19.             {
  20.                 yield return null;
  21.             }
  22.         }
  23.     }
  24.  
PlayerObjectScript.display_pic this var is this link: http://puu.sh/3c74g.png


This is the result


anyone know why it become lines like that??
Thanks!

8
TNet 3 Support / RFC or Custom packets instead?
« on: August 21, 2014, 03:42:07 AM »
Hey, so far I've been watching two TNet videos, I'm a beginner developer I'm a bit confused on this part. Assume I want to make a simple chat room. Should I use RFC which on every client there's a remote functions on
  • OnPlayerJoin
  • OnPlayerSendingMessage
  • OnPlayerQuitRoom
  • and so on

Or should I just ditch this RFC, and create a custom packets. Add codes on the server, tell it what to do case by case depending on what packet it's receiving.
*New Player Joins -> client send request packet to the server* =>
*server accepts the request -> server sending back list of players that is currenly in the room to that newly joined player*

*a player sending a message -> client send message packet to the server* =>
*server accepts the message packet -> server relays that message to all players in channel*

*etc*

So in short, when I should use RFC and when should i use custom packets? Thanks

Pages: [1]