scripting question

I have this 3 script : script A , B and C.
the script main concept :
first thing is I load script A then a variable from script B is changed ( this works).

Then I load a function X in script C using script A.
the function in script C changes the variable data in script B. All compile is fine…

but when I run the program and do the script, it goes hang… wonder that if unity can’t handle that?or is it an iOS limitation?

Here’s some scripts from script A

function AccessScriptB() {
if( touchWithinRange && scriptB.heroTrue == false)
scriptB.heroTrue = true;
scriptB.heroImage = heroImage1;

Script C function is

function X() { scriptB.hNU = hN;}

the function X only has that line of command since I want to change it from script C for future update preparation

touchWithinRange is a range Selection Box

hNU is a static var in Script B

heroTrue is static var in ScriptB

hN is a static var in Script C

while in script B I only shows the variables in OnGUI function

function OnGUI()
GUI.Label ( myRectValues, hNU, mySkin.customStyles[1] ) ;

that’s all I want to do, changing a variable in script B accessing from script A which calls the function in script C and displays it. Anyone can help me?

There are different ways to access functions inside other scripts. Search for “getcomponent” or “sendmessage” or “broadcastmessage” in the docs, in the forum or here. You will find plenty of answers.