void SaveImplementedScript() { if (currentScriptable.IsNull()) { return; } currentScriptable.script = implementedScriptText.text; var first = currentScriptable.hosts.First(); if (first.IsNull()) { return; } first.gameObject.name = implementedHostName.text; }
public void ShowImplementedScriptPanel(ScriptableHost host) { VisibleUnimplementedScriptPanel(false); currentScriptable = host.scripts.First(); if (currentScriptable.IsNull()) { VisibleImplementedScriptPanel(false); return; } implementedScriptText.text = currentScriptable.script; implementedScriptName.text = currentScriptable.name; implementedHostName.text = host.name; VisibleImplementedScriptPanel(true); }