-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRCC_MirrorsSetupEditor.cs
More file actions
61 lines (57 loc) · 2.2 KB
/
Copy pathRCC_MirrorsSetupEditor.cs
File metadata and controls
61 lines (57 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//----------------------------------------------
// Realistic Car Controller
//
// Copyright © 2014 - 2017 BoneCracker Games
// http://www.bonecrackergames.com
// Buğra Özdoğanlar
//
//----------------------------------------------
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Reflection;
public class RCC_MirrorsSetupEditor : Editor {
// static GameObject selectedCar;
//
// [MenuItem("Tools/BoneCracker Games/Realistic Car Controller/Create/Misc/Add Mirrors To Vehicle", false, -42)]
// static void CreateBehavior(){
//
// if(!Selection.activeGameObject.GetComponentInParent<RCC_CarControllerV3>()){
//
// EditorUtility.DisplayDialog("Select a vehicle controlled by Realistic Car Controller!", "Select a vehicle controlled by Realistic Car Controller!", "Ok");
//
// }else{
//
// selectedCar = Selection.activeGameObject.GetComponentInParent<RCC_CarControllerV3>().gameObject;
// CreateMirrors();
//
// }
//
// }
//
// [MenuItem("Tools/BoneCracker Games/Realistic Car Controller/Create/Misc/Add Mirrors To Vehicle", true)]
// static bool CheckCreateBehavior() {
// if(Selection.gameObjects.Length > 1 || !Selection.activeTransform)
// return false;
// else
// return true;
// }
//
// static void CreateMirrors () {
//
// if(!selectedCar.transform.GetComponentInChildren<RCC_Mirror>()){
// GameObject mirrors = (GameObject)Instantiate(RCC_Settings.Instance.mirrors, selectedCar.transform.position, selectedCar.transform.rotation);
// mirrors.transform.SetParent(selectedCar.GetComponent<RCC_CarControllerV3>().chassis.transform, true);
// mirrors.name = "Mirrors";
// RCC_LabelEditor.SetIcon(mirrors.transform.GetChild(0).gameObject, RCC_LabelEditor.Icon.DiamondRed);
// RCC_LabelEditor.SetIcon(mirrors.transform.GetChild(1).gameObject, RCC_LabelEditor.Icon.DiamondBlue);
// RCC_LabelEditor.SetIcon(mirrors.transform.GetChild(2).gameObject, RCC_LabelEditor.Icon.DiamondTeal);
// Selection.activeGameObject = mirrors;
// EditorUtility.DisplayDialog("Created Mirrors!", "Created mirrors. Adjust their positions.", "Ok");
// }else{
// EditorUtility.DisplayDialog("Vehicle Has Mirrors Already", "Vehicle has mirrors already!", "Ok");
// }
//
// }
}