public void WindowFunction(int windowsId) { scrollPoint = GUILayout.BeginScrollView(scrollPoint); if (GUILayout.Button("关闭")) { isShowWindow = false; } IsEnable = GUILayout.Toggle(IsEnable, "是否启用部件螺栓提示"); GUILayout.Label("···功能说明···"); GUILayout.Label("1、鼠标移到螺丝上,能看到螺丝的扳手型号、部件下有几个螺丝"); GUILayout.Label("2、鼠标移到螺丝上,按左边的ALT,能高亮标(红色,黄色)识出这个部件的其他螺丝"); GUILayout.Label("5、我不能100%肯定该功能所有内容一定正确,比如那个一字形螺丝刀的那个提示"); if (GUILayout.Button("重置车辆中的所有螺栓/螺丝纹理(如果你鼠标移动特别快...)")) { List <GameObject> boltGameObjectList = GameObjectUtil.FindChildGameObjectByLikeName(GlobalVariables.GetGlobalVariables().gameObjectSatsuma, "bolt"); foreach (GameObject bolt in boltGameObjectList) { GameObjectUtil.ChangeGameObjectMaterial(bolt, defaultBoltMaterial); } } GUILayout.Label("默认螺栓 : " + defaultBoltMaterial); GUILayout.Label("高亮螺栓 : " + activeBoltMaterial); GUILayout.EndScrollView(); GUI.DragWindow(); }
public void HeightLightNotKeyDown(GameObject gameObject, Color color) { GameObject boltGameObject = GameObjectUtil.GetChildGameObjectLikeNameFirst(gameObject, "bolt"); if (boltGameObject != null) { GameObjectUtil.ChangeGameObjectMaterial(boltGameObject, activeBoltMaterial); GameObjectUtil.ChangeGameObjectColor(boltGameObject, color); } }
public void HeightLight(GameObject gameObject, Color color) { GameObject boltGameObject = GameObjectUtil.GetChildGameObjectLikeNameFirst(gameObject, "bolt"); if (boltGameObject != null && Input.GetKey(KeyCode.LeftAlt)) { GameObjectUtil.ChangeGameObjectMaterial(boltGameObject, activeBoltMaterial); GameObjectUtil.ChangeGameObjectColor(boltGameObject, color); } else { GameObjectUtil.ChangeGameObjectMaterial(boltGameObject, defaultBoltMaterial); } }