Answer by Lovrenc
[Second example in this documentation is relevant.][1] [1]: http://docs.unity3d.com/Documentation/ScriptReference/Renderer-material.html
View ArticleAnswer by Lovrenc
First, put another log line before your IF statement. If that line prints in console, your problem is in if(col.gameObject.name == "Ball"). If that is not the case, check this [documentation][1] about...
View ArticleAnswer by Lovrenc
You cannot mix languages in same script. But you can have one JS script and one C# script and so on. EDIT: you don't even need to know JS. You can do everything with c#. It is good to know it tho to be...
View ArticleAnswer by Lovrenc
Resources is **special** folder in unity ([List of special folders][1]). Unity always loads all assets from resources folder. You can move assets to different folder. Then unity will determine what he...
View ArticleAnswer by Lovrenc
you have to have your hitted variable outside of the function. The way it is now, you allways declare new hitted variable. You do not have any reference to past events. var hitted : boolean; function...
View ArticleAnswer by Lovrenc
Your "Mathf.Clamp" is not in Update function. In update you are lowering hunger every call, but your clamp is not called. var health = 100.0; var hunger = 100.0; function Update () { hunger = hunger -...
View ArticleAnswer by Lovrenc
I checked all registries wich contained word unity and found nothing either. At the end i uninstalled unity 4.3 and everything works fine now. Did you ever had problems if multiple versions are...
View ArticleAnswer by Lovrenc
I am sorry. But this is a great moment to start using [version control][1]. [1]: http://en.wikipedia.org/wiki/Revision_control
View ArticleAnswer by Lovrenc
First: this call you attempted void OnPlayerDisconnected(); could never work. When you are calling functions you only type their name and then the brackets (and in brackets arguments if the need them)....
View ArticleAnswer by Lovrenc
Since this is a learning project i dont know how much of a "spoiler" answer you want. However, your problem is in your data structure. You have one Answers list for all your questions. This wont work....
View ArticleAnswer by Lovrenc
When you create any object in blender, check your normals (draw them out). If normal comes out of the face, you will see it rendered in unity. If there is no normal, it will be transparent. As...
View ArticleAnswer by Lovrenc
Of course. This is basic functionality every programming language provides. [link][1] [1]: http://msdn.microsoft.com/en-us/library/vstudio/8bh11f1k.aspx
View ArticleAnswer by Lovrenc
Debug.Log is just a function. It is essentialy same as "print" in php, WriteLine in C# etc. The only difference is it writes directly into unity console. It logs whatever you give it. Debug.Log("Write...
View ArticleAnswer by Lovrenc
Unity doesent crash, you created infinite loop! Your "while" never exits, it just goes on and on and on. If your AutoHit doesent get target, it will search for it again and again... but nothing in your...
View ArticleAnswer by Lovrenc
[Second example in this documentation is relevant.][1] [1]: http://docs.unity3d.com/Documentation/ScriptReference/Renderer-material.html
View ArticleAnswer by Lovrenc
First, put another log line before your IF statement. If that line prints in console, your problem is in if(col.gameObject.name == "Ball"). If that is not the case, check this [documentation][1] about...
View ArticleAnswer by Lovrenc
You cannot mix languages in same script. But you can have one JS script and one C# script and so on. EDIT: you don't even need to know JS. You can do everything with c#. It is good to know it tho to be...
View ArticleAnswer by Lovrenc
Resources is **special** folder in unity ([List of special folders][1]). Unity always loads all assets from resources folder. You can move assets to different folder. Then unity will determine what he...
View ArticleAnswer by Lovrenc
you have to have your hitted variable outside of the function. The way it is now, you allways declare new hitted variable. You do not have any reference to past events. var hitted : boolean; function...
View Article