Answer by Ngoc Ngo
Facebook profile picture presents as a Texture, so basically you can do this: http://answers.unity3d.com/questions/332335/saving-a-texture2d-as-a-png.html Then check if this apply to your situation:...
View ArticleAnswer by Ngoc Ngo
Unless the camera/phone has some distinct features, I don't think you can do it directly. Alternately you can upload phone2's GPS coordinates, facing direction.. to your server, then every other phone...
View ArticleAnswer by Ngoc Ngo
I would recommend Strategy Pattern, then use a Factory to cover it. "Head First Design Patterns" described these clearly. Hope it helps!
View ArticleAnswer by Ngoc Ngo
When the game receive the host list, it will call OnMasterServerEvent again with ms = HostListReceived anyway, so may want to add this on your line 10: } else if (ms == HostListReceived) { HostData[]...
View ArticleAnswer by Ngoc Ngo
It sounds like the prefab's collider encase all the children, so you can only 'hit' the prefab. If that's the case, you may want to remove the prefab's collider and give each child object a proper...
View ArticleAnswer by Ngoc Ngo
It clearly said that you have to deploy the game on one of the supported platforms, the ads won't work on Standalone or Unity Editor, but either Android or iOS will be fine.
View ArticleAnswer by Ngoc Ngo
At the end of that animation, add an event which call a function somewhere which in turn decrease 'health' value in this script, and it may work.
View ArticleAnswer by Ngoc Ngo
You don't have to use OnMouseDown, make a GUILayout.Toggle like this: m_isPaused = GUILayout.Toggle(m_isPaused, "Pause!");
View ArticleAnswer by Ngoc Ngo
The size on the scene editor doesn't matter, it is only useful for debugging purpose. With your standalone build, you can always set a fixed size for the game window (Edit > Player > Resolution)...
View ArticleAnswer by Ngoc Ngo
Since nobody cares to help, I will post my workaround here, maybe someone will find it useful: 1. Use a webservice for matchmaking. 2. When a match is created, its ID is sent to both players. 3. One...
View ArticleAnswer by Ngoc Ngo
OnEnable is not a part of GameObject. Methods like those are called via SendMessage. To achieve the same effect, you may want to do something like: this.gameObject.SendMessage("OnEnable"); which call...
View ArticleAnswer by Ngoc Ngo
The shader has been moved here: http://wiki.unity3d.com/index.php?title=3DText Shader "GUI/3D Text Shader" { Properties { _MainTex ("Font Texture", 2D) = "white" {} _Color ("Text Color", Color) =...
View ArticleAnswer by Ngoc Ngo
You could use a TextMesh instead of GUIText, then move it inside the scene with its Transform.
View ArticleAnswer by Ngoc Ngo
Stuff in OnGUI will be rendered several times after the scene had been rendered, so, you may want to make that GUI Text into a GUI.Label or something.
View ArticleAnswer by Ngoc Ngo
Alternatively, you can keep only one "stage" script active at a time while disable the others. At the end of stage1 timeline, you active stage2 and deactivate itself(the same goes for stage3 and stage4).
View ArticleAnswer by Ngoc Ngo
Are you sure you there are no documents about this? Anyway, GetComponent(); That statement return an object of type SpriteRenderer which contains a property named "sprite". So basically, it equals...
View Article