It’s weird, I thought this would be really easy, but I was looking at the GUI.TextArea and stuff, but it said some weird errors.
Said Object is not a set instance of something
Anyways, how could I simple make a text? with script?
It’s weird, I thought this would be really easy, but I was looking at the GUI.TextArea and stuff, but it said some weird errors.
Said Object is not a set instance of something
Anyways, how could I simple make a text? with script?
There are some different ways. You can use scripting and CUI’s methods or 3DTextMesh without scripting, depends on your requirements.
What kind of weird error? What’s your code?
All you need for a GUI.TextArea to appear on your screen is a Rect and a string. How much can go wrong between copy+pasting the code from the page and actually running it in Unity?
“shrug”
GUI.TextArea(new Rect(0,0,100,100),Item_Picked_Up_Name,100);
It says:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUI.DoTextField (Rect position, Int32 id, UnityEngine.GUIContent content, Boolean multiline, Int32 maxLength, UnityEngine.GUIStyle style) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/GUI.cs:538)
UnityEngine.GUI.TextArea (Rect position, System.String text, Int32 maxLength) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/GUI.cs:511)
GUI_Inventory.OnGUI () (at Assets/Scripts/GUI_Inventory.cs:51)
Try :
public string Item_Picked_Up_Name = "";
Item_Picked_Up_Name = GUI.TextArea(new Rect(0,0,100,100),Item_Picked_Up_Name,100);