static void SetupPlayer(GameObject player) { if (player == null) { return; } bl_PlayerCameraSwitcher pcs = player.GetComponent <bl_PlayerCameraSwitcher>(); if (pcs != null) { return; } pcs = player.AddComponent <bl_PlayerCameraSwitcher>(); pcs.viewState = bl_CameraViewSettings.Instance.customViews[2]; pcs.viewAimState = bl_CameraViewSettings.Instance.customViews[3]; EditorUtility.SetDirty(pcs); EditorUtility.SetDirty(player); }
private void OnEnable() { script = (bl_PlayerCameraSwitcher)target; redIcon = EditorGUIUtility.IconContent("d_redLight"); }