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

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

            Plugin.Instance.FirstPersonEnabledChanged += OnFirstPersonEnabledChanged;
            SceneManager.sceneLoaded += SceneManagerOnSceneLoaded;
        }
Ejemplo 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;
        }
Ejemplo 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;
        }
Ejemplo 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;
        }