public PlayerAvatarManager(AvatarLoader avatarLoader, CustomAvatar startAvatar = null)
        {
            _playerAvatarInput = new PlayerAvatarInput();
            _avatarLoader      = avatarLoader;

            if (startAvatar != null)
            {
                CurrentPlayerAvatar = startAvatar;
            }

            Plugin.Instance.FirstPersonEnabledChanged += OnFirstPersonEnabledChanged;
            SceneManager.sceneLoaded += SceneManagerOnSceneLoaded;
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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;
        }