Unity Float From Another Script

[Solved] Unity Float From Another Script | Csharp - Code Explorer | yomemimo.com
Question : unity float from another script

Answered by : eggspecialist

public GameObject ScriptHolder;
public float Afloat;
//retrieve float every frame
void Update()
{	Afloat = ScriptHolder.GetComponent<Script>().WantedFloat;
}

Source : | Last Update : Thu, 28 Jan 21

Question : get float from others script

Answered by : gal

var class1 = GameObject.Find("MyObjectScript").GetComponent<MyClass1>(); class1.myfloat = 3;

Source : | Last Update : Mon, 11 Jan 21

Answers related to unity float from another script

Code Explorer Popular Question For Csharp