public PlayerAvatarManager(AvatarLoader avatarLoader, CustomAvatar startAvatar = null) { _playerAvatarInput = new PlayerAvatarInput(); _avatarLoader = avatarLoader; if (startAvatar != null) { CurrentPlayerAvatar = startAvatar; } Plugin.Instance.FirstPersonEnabledChanged += OnFirstPersonEnabledChanged; SceneManager.sceneLoaded += SceneManagerOnSceneLoaded; }
public void Init(IPA.Logging.Logger log) { Util.Logger.logger = log; Instance = this; AvatarLoader = new AvatarLoader(CustomAvatarsPath, AvatarsLoaded); AvatarTailor = new AvatarTailor(); _avatarUI = new AvatarUI(); FirstPersonEnabled = PlayerPrefs.HasKey(FirstPersonEnabledKey); //RotatePreviewEnabled = PlayerPrefs.HasKey(RotatePreviewEnabledKey); SceneManager.sceneLoaded += OnSceneLoaded; }
public void OnApplicationStart() { if (_init) { return; } _init = true; File.WriteAllText("CustomAvatarsPlugin-log.txt", string.Empty); AvatarLoader = new AvatarLoader(CustomAvatarsPath, AvatarsLoaded); FirstPersonEnabled = PlayerPrefs.HasKey(FirstPersonEnabledKey); SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; }
public void OnApplicationStart() { if (_init) { return; } _init = true; File.WriteAllText("CustomAvatarsPlugin-log.txt", string.Empty); AvatarLoader = new AvatarLoader(CustomAvatarsPath, AvatarsLoaded); AvatarTailor = new AvatarTailor(); _avatarUI = new AvatarUI(); FirstPersonEnabled = PlayerPrefs.HasKey(FirstPersonEnabledKey); //RotatePreviewEnabled = PlayerPrefs.HasKey(RotatePreviewEnabledKey); SceneManager.sceneLoaded += SceneManagerOnSceneLoaded; }