private ScriptStruct FindGlobalVariableOrType(string type, ref bool staticAccess)
{
foreach (IScript script in GetAutoCompleteScriptList())
{
foreach (ScriptStruct structDef in script.AutoCompleteData.Structs)
{
if ((structDef.Name == type) && (structDef.FullDefinition))
{
staticAccess = true;
return structDef;
}
}
foreach (ScriptVariable varDef in script.AutoCompleteData.Variables)
{
if (varDef.VariableName == type)
{
staticAccess = false;
return FindGlobalVariableOrType(varDef.Type);
}
}
}
staticAccess = false;
return null;
}