Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 private void OnEnable()
 {
     script  = (bl_PlayerCameraSwitcher)target;
     redIcon = EditorGUIUtility.IconContent("d_redLight");
 }