public void Select(PersoBehaviour pb, bool view = false) { //print(pb.name); if (selectedPerso != pb || view) { selectedPerso = pb; cam.JumpTo(pb.gameObject); } }
public void Select(BasePersoBehaviour pb, bool view = false) { //print(pb.name); if (selectedPerso != pb || view) { #if UNITY_EDITOR if (pb?.gameObject != null) { UnityEditor.Selection.activeGameObject = pb.gameObject; } #endif selectedPerso = pb; if (controller.CinematicSwitcher == null || !controller.CinematicSwitcher.HasControlOfCamera) { cam.JumpTo(pb.gameObject); } } }