public void PrepareSelectedObjectToReceiveBehavior() { if (selectedObject == -1) { DebugMessage.ErrorMessage(TranslationManager.GetMessage("SelectObjectFirst")); PanelLoadBg.AbortLoadStatic(); return; } Debug.Log("Preparing object " + selectedObjectName + " to receive behavior."); PanelLoadBg.SetProgrammableObjectStatic(GetIthObjectInSceneTransform(selectedObject).GetComponent <ProgrammableObject>()); }
void Start() { if (myAnimator == null) { myAnimator = this.gameObject.GetComponent <Animator>(); } if (mydropdown == null) { mydropdown = this.gameObject.GetComponentInChildren <Dropdown>(); } instance = this; this.gameObject.SetActive(false); }
public void LoadCode(Dropdown sourceCode) { int result = -1; result = PanelLoadBg.TryToLoadCodeToProgrammableObjectStatic(sourceCode); if (result != 0 && sourceCodeComponent != null) { result = sourceCodeComponent.LoadCode(sourceCode); } if (result == 0) { DebugMessage.SuccessMessage(TranslationManager.GetMessage("LoadedSuccessfully")); } else { DebugMessage.ErrorMessage(TranslationManager.GetMessage("ErrorLoading")); } PanelLoadBg.ExitAnimation(); }
public void PrepareSourceCodeEditorToReceiveBehavior() { PanelLoadBg.SetProgrammableObjectStatic(null); }
void Start() { if (myAnimator == null) myAnimator = this.gameObject.GetComponent<Animator>(); if (mydropdown == null) mydropdown = this.gameObject.GetComponentInChildren<Dropdown>(); instance = this; this.gameObject.SetActive(false); }