string constructAssetFilename() { GameObject displayBodyComponent = GameObject.Find("SceneControl"); if (displayBodyComponent == null) { this.enabled = false; print("ERROR"); } bodyDisplayer = displayBodyComponent.GetComponent <DisplayBody>(); Destroy(displayBodyComponent); return(bodyDisplayer.DisplayId + "-Asset"); }
/** * Function to determine the file name from the chosen IDs */ string constructAssetFilename() { GameObject displayBodyComponent = GameObject.Find("SceneControl"); if (displayBodyComponent == null) { //TODO Figure out how to get gameobject variable from other scene Debug.LogError("failed to find object :("); this.enabled = false; } bodyDisplayer = displayBodyComponent.GetComponent <DisplayBody>(); Destroy(displayBodyComponent); return(bodyDisplayer.DisplayId + "-Asset"); }