- Home /
Access water4 scripts via my script?
Hello, i'm trying to access the folowing scripts and their values from my script, but my script doesn't seem to see those water4 scripts.
Picture of what i am trying to access:
I tried using following code but it didn't seem to work(it doesn't see the WaterBase script and such).
GameObject water = GameObject.Find("Water4Advanced");
WaterBase wat = water.GetComponent<WaterBase>();
WaterBase unknown for it ;/
How to do that correctly? ;D Thanks.
Answer by Mr-Tomato · Oct 16, 2016 at 10:19 PM
I had to add this line at my script:
using UnityStandardAssets.Water;
Your answer
Follow this Question
Related Questions
How to detect an object which be in FOV of certain camera ? 1 Answer
Cannot destroy Component while GameObject is being activated or deactivated 2 Answers
Refresh panel with prefab contained value from json that created using array 0 Answers
Is there a way to dynamically attach a script to a GameObject during runtime? 1 Answer
Creating a GameObject variable without instantiating it? 1 Answer