Showing Results 1 to 25 of 500 results for Type: Posts; User: tonyd
Search took 0.12 seconds.
Or you could do it the easy way, and just use GUILayout and BeginScrollView:
I picked Unity because it supported multiple programming languages, was multi-platform, and had a powerful built-in GUI system.
One of my few complaints with Unity is that they never released...
Yes, get rid of the monobehaviour inheritance. You don't need it unless your script gets attached to an object, or unless you need to call Monobehaviour functions.
Then in your main script, create...
As simple as your GUI is, there is really no reason not to use the built-in GUI system in Unity.
You can use System.IO for this sort of thing:
But the easiest way is probably a Text Asset:
var asset : TextAsset;
var myArray = new...
Looks great, you might want to post this info in the Boo Scripting thread:
Easiest method is to use PlayerPrefs:
But you can also use System.IO:
Your array contains Objects, not variables, but if you just want the name of the object, you can get that via the name property (yourObject.name).
Here is an example of how to use GUILayout and tooltips (you'll need to assign your inventory text and tips in the inspector):
In a perfect world, everyone would search Unity Answers (as well as the Unity Script Reference) before posting, but this forum is still the quickest way to get answers to scripting questions.
Seems to work fine to me. Boo test below.
class MakeObjects (MonoBehaviour):
person = gameObject.AddComponent(Person)
That actually wasn't aimed at you ;), but I do suggest reading the FAQ.
If you are new to scripting, you might want to visit this link:
And I suggest you read the scripting forum FAQ:
There is nothing wrong with asking scripting questions in the scripting forum
There are plenty of people using the built-in GUI. Why?
Because it's easy to use; you can't get much easier than this:
if GUILayout.Button("Show Menu"): displayMenu = true
Put your textures in a folder called 'Resources', and then use Resources.Load to load them when needed.
Try the following code. You'll need to attach it to the object you want to move.
If you wish to keep the object on-screen, you'll need to tweak the min and max values, or use some other method.
You're trying to access CarStats_Player in line 52 when the name of your script is Car_Stats_Player.
You should be getting a whole bunch of errors in the console... you just need to fix them all.
You should start by removing the first pair of leading and trailing braces, as you don't need those....
Yes, but you'd have to specify the path.
string folderName = "folder1/";
And load folderName + fileName.
You could load a text file based on the object name.
string fileName = this.name + "_text"; //--so if the name was object1, it would set the fileName to 'object1_text'...
There are several different ways you could do this. One is to use GUI Groups:
var hudPos : Rect;
var hudImage : Texture2D;
var bulletsLeft = 6;
var magazines = 2;
You could also use string slicing, here is a UnityScript example:
var fullPath = "X:/Projects/4604-Renovation/Unity/4604_02/Assets/Models/FullBuildin g/Materials";
First, you need to properly indent your code and format it as code when posting it here (otherwise it is very difficult to read).
Press 'Go Advanced' on the bottom right hand corner of the Reply...