edit bool from diffirent script
using UnityEngine; using System.Collections; public class BoolChanger : MonoBehaviour { public IGotBools boolBoy; void Start() { // Finds the object the script "IGotBools" is attached to and assigns it to the gameobject called g. GameObject g = GameObject.FindGameObjectWithTag (BoolKeeper); //assigns the script component "IGotBools" to the public variable of type "IGotBools" names boolBoy. boolBoy = g.GetComponent<IGotBools> (); // accesses the bool named "isOnFire" and changed it's value. boolBoy.isOnFire = false; } }
Also in C#:
- c# yield
- check if two timespans intersect c#
- fly cam extended script unity 3d
- add text to combobox c#
- c# check to see if dictionary key exists
- stateteach.net
- unity rotate object relative to camera
- string format comma c#
- c# events and delegates
- c# remove spaces from string
- c# input integer
- gfortran: declare an array
- prefab gets character transform
- unity cancel invokerepeating
- downlaod file and use C#
- c# return multiple value unity
- what is using static in c#
- c# function
- Exception thrown: 'System.FormatException' in mscorlib.dll dates
- attribute usage c#
- c# enum.getvalues
- asp.net core 3.1: cast jObject to dictionary<string,string>
- unity rotate around point
- c# datetime dd/mm/yyy hh:mm:ss