Beispiel #1
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            PresentationManager target = this.target as PresentationManager;

            if (GUILayout.Button("Save Presentation"))
            {
                target.Save();
            }
        }
Beispiel #2
0
        public void SetModel(PresentationManager manager, SlideModel slideModel)
        {
            this.manager       = manager;
            name               = slideModel.name;
            transform.position = slideModel.position;

            if (labelText != null)
            {
                labelText.text = name;
            }

            foreach (var compModel in slideModel.components)
            {
                var comp = manager.InstantiateComponent(compModel);
                if (comp != null)
                {
                    comp.transform.parent = transform;
                }
            }
        }