예제 #1
0
        private static ClipLibrary Configure(GameObject go)
        {
            var group = go.AddComponent <VerticalLayoutGroup>();

            group.spacing = 5f;

            var rect = go.GetComponent <RectTransform>() ?? go.AddComponent <RectTransform>();

            rect.pivot = new Vector2(0, 1);

            _content = VamPrefabFactory.CreateScrollRect(go);

            return(go.AddComponent <ClipLibrary>());
        }
예제 #2
0
        public void Init(AudioMateController mainController)
        {
            if ((UnityEngine.Object)mainController == (UnityEngine.Object)null)
            {
                SuperController.LogError("AudioMate: Error during UI initialization. Controller or Collection Manager are set to null.");
                return;
            }
            controller = mainController;
            Log("### Init ###");
            _leftUI            = leftPanel.AddComponent <VamPrefabFactory>();
            _leftUI.controller = controller;

            _rightUI            = rightPanel.AddComponent <VamPrefabFactory>();
            _rightUI.controller = controller;
        }
예제 #3
0
        public void Init(AudioMateController controller)
        {
            if ((UnityEngine.Object)controller == (UnityEngine.Object)null)
            {
                return;
            }
            _controller = controller;
            Log("### Init ###");
            _buttonPrefab = controller.manager.configurableButtonPrefab;
            Clips         = new List <AudioMateClip>();

            var container = CreateContainer();

            prefabFactory            = container.gameObject.AddComponent <VamPrefabFactory>();
            prefabFactory.controller = controller;

            _controller.fileManager.OnNewFilesImported.AddListener(OnSourceClipsUpdated);
        }