// Use this for initialization void Start() { /* * tryCreate = (GameObject)Resources.Load("EmptyObject"); * Instantiate(tryCreate); * tryCreate.transform.name = "tryCreate"; */ NCCodeFormat_Script = GameObject.Find("MainScript").GetComponent <NCCodeFormat>(); ProgramModule_Script = GameObject.Find("MainScript").GetComponent <ProgramModule>(); CooSystem_Script = GameObject.Find("MainScript").GetComponent <CooSystem>(); Main = GameObject.Find("MainScript").GetComponent <ControlPanel>(); Auto_Script = GameObject.Find("AutoMove").GetComponent <AutoMoveModule>(); Move_Script = GameObject.Find("move_control").GetComponent <MoveControl>(); SpindleControl_script = GameObject.Find("spindle_control").GetComponent <SpindleControl>(); PathLineDraw_Script = GameObject.Find("Main Camera").GetComponent <PathLineDraw>(); AutoToolChange_Script = GameObject.Find("ToolChange").GetComponent <AutoToolChangeModule>(); Warnning_Script = gameObject.GetComponent <Warnning>(); Softkey_Script = gameObject.GetComponent <SoftkeyModule>(); CooZeroPoint = new Vector3(0, 0, 0); singleStepEnd = 100; CurrentModal = new ModalCode_Fanuc_M(); // CurrentModal.RotateSpeed = 3000; GameObject ForCuttingWork = GameObject.Find("GameObject"); if (ForCuttingWork == null) { Debug.LogError("请添加空物体GameObject!"); return; } ForCuttingWork.name = "CuttingWork"; ForCuttingWork.AddComponent <CuttingWork>(); CuttingWork_Script = ForCuttingWork.GetComponent <CuttingWork>(); }
// Use this for initialization void Start() { ShowOuterSkin_Script = gameObject.GetComponent <ShowOuterSkin>(); Camera_Script = GameObject.Find("Main Camera").GetComponent <camera_sm>(); PathLineDraw_Script = GameObject.Find("Main Camera").GetComponent <PathLineDraw>(); ToolChange_Script = GameObject.Find("ToolChange").GetComponent <AutoToolChangeModule>(); AutoMove_Script = GameObject.Find("AutoMove").GetComponent <AutoMoveModule>(); Main = gameObject.GetComponent <ControlPanel>(); gameObject.AddComponent("ProgramReset"); Reset_Script = gameObject.GetComponent <ProgramReset>(); dynamic_height = -btn_height; min_height = -btn_height; max_height = 0; }