Quantcast
Channel: Questions in topic: "script referencing"
Browsing all 41 articles
Browse latest View live

Referencing an Array of Objects

I want one script to cross reference multiple copies of a prefab in the scene. So when I click on a GUI button, it will manipulate all of the prefabs I have assigned in another script. Anyone know how...

View Article



"Horizontal" script referencing in C#

I'm trying to switch over from Javascript to C#, as you might have guessed, and I'm just wondering about how I can get scripts to refer to scripts in the same script compilation stage. I understand...

View Article

On trigger and button input to enable/disable script

hello everyone, im tryin to make a script to attach on a gameobject that will find my player via tag and enable/disable the third person controller script on key press, i went on to do this by using...

View Article

How to use methods with the same name from different scripts attached to this...

How do I reference a generic script in another script? So lets say Object AO has script AS with method name "Method()". Another object BO has a script BS with the same name "Method()". Now, I want to...

View Article

Prefab doesn't hold my script reference?

Hello there, So I have a Prefab that is randomly generated through a spawner in my level...however the "ScoreManager" script reference (an instance = null script) doesn't apply to the Prefab itself,...

View Article


error CS0131 Assets/route1.cs(12,25): error CS0131: The left-hand side of an...

really would like some help to make this right. i know its probably something easy I just keep running into a blank wall. first script: public class route1 : MonoBehaviour { public bool r1; void...

View Article

Problem when acessing a list from another script? (ArgumentOutOfRangeException)

------ **Edit: With the tip given by @gjf, i have changed in the parent script the function "Start" to "Awake", in this way i guarantee that the list is created before the child objects try to load,...

View Article

How do I link variables in between two scripts in c#

guys I feel silly have been looking the whole day in unity answers but my script still doesn't work been trying to use gameobject method to link my shieldHP with mytest manager to see if the shield...

View Article


How do you refference SetActive (true) from another script?

I'm using 2 scripts. One for the SetActive PauseMenu.cs public void Start() { PauseUI.SetActive (false); } //Pause Menu Trigger public void Update() { if (Input.GetButtonDown ("Pause")) { paused =...

View Article


Referencing another script error/problem

I am trying to reference another script for my game Pong 2D this is the Ball script for the game At the line "TriggerEvent = RightSideScene.GetComponent(TriggerEvent)();" I get the error "Argument1:...

View Article

Cleaning project? After uninstalling an asset

I've just uninstalled an editor based asset and I'm getting the classic error `The referenced script on this Behaviour is missing!` I have check the game object and all its children which the error is...

View Article

Referencing an Array of Objects

I want one script to cross reference multiple copies of a prefab in the scene. So when I click on a GUI button, it will manipulate all of the prefabs I have assigned in another script. Anyone know how...

View Article

"Horizontal" script referencing in C#

I'm trying to switch over from Javascript to C#, as you might have guessed, and I'm just wondering about how I can get scripts to refer to scripts in the same script compilation stage. I understand...

View Article


On trigger and button input to enable/disable script

hello everyone, im tryin to make a script to attach on a gameobject that will find my player via tag and enable/disable the third person controller script on key press, i went on to do this by using...

View Article

How to use methods with the same name from different scripts attached to this...

How do I reference a generic script in another script? So lets say Object AO has script AS with method name "Method()". Another object BO has a script BS with the same name "Method()". Now, I want to...

View Article


Prefab doesn't hold my script reference?

Hello there, So I have a Prefab that is randomly generated through a spawner in my level...however the "ScoreManager" script reference (an instance = null script) doesn't apply to the Prefab itself,...

View Article

error CS0131 Assets/route1.cs(12,25): error CS0131: The left-hand side of an...

really would like some help to make this right. i know its probably something easy I just keep running into a blank wall. first script: public class route1 : MonoBehaviour { public bool r1; void...

View Article


Problem when acessing a list from another script? (ArgumentOutOfRangeException)

------ **Edit: With the tip given by @gjf, i have changed in the parent script the function "Start" to "Awake", in this way i guarantee that the list is created before the child objects try to load,...

View Article

How do I link variables in between two scripts in c#

guys I feel silly have been looking the whole day in unity answers but my script still doesn't work been trying to use gameobject method to link my shieldHP with mytest manager to see if the shield...

View Article

How do you refference SetActive (true) from another script?

I'm using 2 scripts. One for the SetActive PauseMenu.cs public void Start() { PauseUI.SetActive (false); } //Pause Menu Trigger public void Update() { if (Input.GetButtonDown ("Pause")) { paused =...

View Article
Browsing all 41 articles
Browse latest View live




Latest Images