Difference between revisions of "Chunity Debugging Community"

From CCRMA Wiki
Jump to: navigation, search
(Syntaxl)
Line 18: Line 18:
 
If you run your chuck code inside the RunCode() function, make sure your brackets are escaped.   
 
If you run your chuck code inside the RunCode() function, make sure your brackets are escaped.   
 
https://stackoverflow.com/questions/91362/how-to-escape-braces-curly-brackets-in-a-format-string-in-net
 
https://stackoverflow.com/questions/91362/how-to-escape-braces-curly-brackets-in-a-format-string-in-net
 +
 +
If you need to add your ChuckMainInstance to a ChuckSubInstance in a script, there are two ways to do it:
 +
# Edit line 480 in the script, ChuckSubInstance, to be: <code>chuckMainInstance = GameObject.Find("nameofchuckobject").GetComponent<ChuckMainInstance>(); </code>
 +
# Add a "TheChuck" component to your ChuckMainInstance. Then you can access it through the static variable TheChuck.instance. New ChuckSubInstances will check this variable automatically if you don't set their ChuckMainInstance.
  
 
== Collaboration ==
 
== Collaboration ==
 
Use WeChat as much as possible for getting help in debugging. Also would be nice to team up and work alongside another student so that knowledge transfer is possible even if the ideas are different.
 
Use WeChat as much as possible for getting help in debugging. Also would be nice to team up and work alongside another student so that knowledge transfer is possible even if the ideas are different.

Revision as of 15:02, 15 November 2018

This is a page for people to post common and unusual problems and solutions that come about in using Chunity. Hopefully we can all learn from each other and make the debugging process a little less frustrating!


Sound

Sound not working

My scene wasn't making any sound, but I could see the sound going on the green level meters on my ChuckSubInstance. Other applications on my computer made sound too. I figured out that there was a "Mute Audio" button on the game scene view, and it was accidentally pressed. Unmuting audio fixed my problem.

Sound glitchy

Once I added more than 32 ChuckSubInstances, my scene's audio got glitchy. It seemed like some of the ChuckSubInstances were just straight up not playing. I found out that there's a setting Edit > Project Settings > Audio > Real Voices. Unity will completely ignore more Audio Sources than this number, and all my ChuckSubInstances had the default priority, so it was just jumping around between them all not sure what to do. I increased the number of Real Voices to be more than my number of ChuckSubInstances, and my project went back to normal.

Microphone

Crash with no mic

I found out that Chunity crashes / hangs if my computer has no microphone when I start the scene. I told the Chunity developers, and for now, I just need to make sure to have a mic plugged in before starting my scene.


General

Syntaxl

If you run your chuck code inside the RunCode() function, make sure your brackets are escaped. https://stackoverflow.com/questions/91362/how-to-escape-braces-curly-brackets-in-a-format-string-in-net

If you need to add your ChuckMainInstance to a ChuckSubInstance in a script, there are two ways to do it:

  1. Edit line 480 in the script, ChuckSubInstance, to be: chuckMainInstance = GameObject.Find("nameofchuckobject").GetComponent<ChuckMainInstance>();
  2. Add a "TheChuck" component to your ChuckMainInstance. Then you can access it through the static variable TheChuck.instance. New ChuckSubInstances will check this variable automatically if you don't set their ChuckMainInstance.

Collaboration

Use WeChat as much as possible for getting help in debugging. Also would be nice to team up and work alongside another student so that knowledge transfer is possible even if the ideas are different.