Quantcast
Channel: Answers by "diabloroxx"
Viewing all articles
Browse latest Browse all 60

Answer by diabloroxx

$
0
0

Can't you have a boolean variable attached in the first function and then make it false using the second function. Eg:

Script A -

bool AmActive = true;

void SomeFunction()
{
if(AmActive)
.... blah blah blah
}

Then in another script, you can make the bool AmActive as false.

Script B -

ScriptA.AmActive = false;
function SimilarFunction()
{
....
}

Of course you can use this to access other gameobjects. And the scripts using the GetComponent


Viewing all articles
Browse latest Browse all 60

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>