Unity3D Help Q&A:


 

Other Unity Tutorials:

·         http://walkerboystudio.com/html/unity_training___free__.html (from Charles Chou, Spring 2014)

 

 

 

General Configuration:

Q: Which are the require files for saving/submitting Unity3D project (answer from Michael Plotke, Spring 2013).
A: Enable unity metafile saving, and removing all mono-project scripting support:

  1. Enable Unity metafile saving:
  2. Now, remove Library folder, and mono-IDE support files:

 

Q: The default Mono IDE is really slow, how can I use a different editor?
A: Edit ?Preferences: External Tools: External Script Editor (choose VS?) (answer from Dipen Patel, Jeb Pavleas, Spring 2013). NOTE: I have not figured out how to attach VS debugger to Unity3d, you may have to pay to get this!

 

Q: What is a good source code revision control system for sharing (from Michael Plotke, Spring 2013).
A: GitHub seems to work well:

  1.  Upgrade to a student account at GitHub to get private repositories.
  2. Follow the article Unity + Git, Friends Forever – Pt 1 : Setup.
  3. Look at GitHub for Windows as a simplified alternative to SourceTree (mentioned in the article).

A: Nathan Scott Spring 2013: here is how to set up using Mercurial: http://www.gamasutra.com/blogs/BurkayOzdemir/20130303/187697/Using_Unity3D_with_external_VCS_Mercurial__Bitbucket_step_to_step_guide.php


 
Scripting
:

Q:I have trouble causing OnTriggerEnter() to fire when I shoot at a stationary gameObject
A: Make sure the RigidBody component is attached to the moving object, stationary objects' RigitBody is not capable of triggering collisions. If for some reasons you cannot attach RigidBody to the moving object, take a read: http://docs.unity3d.com/Documentation/Components/RigidbodySleeping.html, and http://answers.unity3d.com/questions/173916/ontriggerenter-doesnt-work-if-the-colliding-object.html. (transform.Translate(0,0,0) seem to wake up the physics engine).

 

Q: How do I change the color GUIText?
A: Answer from Matt Parker, posted by Kevin Call (Spring 2013)
e.g.:

Font displayFont; // Set via Unity UI
Label echoLabel = new Label(0,0);
echoLabel.Style.font = displayFont
echoLabel.Style.normal.textColor = YourChoice.



Input
:

Q: We have problems with multiple players using XBOX360 controllers on the same computer.
Issue 1: Button presses being picked up for all controllers when a specific joy num has been specified in the input manager.
Resulution:  Unity ignores the joy num field when multiple XBOX360 controllers are plugged in, for button presses. Thus the positive input name has to be "joystick # button #" for button presses when using multiple controllers on a single system. (from Michael Waite, Spring 2013)

Issue 2: Unity seems to be randomly assigning which controller does what joy num's trigger buttons. Thankfully, it does not swap them such that a left trigger is registered as a right trigger's input, but it IS messing up such that controller 1's triggers are moving controller 2's character, and vice versa, or even leaving one of the controllers' trigger buttons doing nothing.
Resulution:  It appears that this is an issue with Unity itself, but can be solved if you use a third-party plugin called XInput, which you can download here: http://speps.fr/xinputdotnet. It does require DirectX to function, however (and, according to research, doesn't work with the Google web player), so keep that in mind. (from Noel Hansen, Spring 2013). Here is a guide on how to integrate Xinput into Unity (from Andrew Harvey, Spring 2013).


 
Networking
:

Tutorials: