コード例 #1
0
        /// <summary>
        /// Commit the current template configuration
        /// </summary>
        protected virtual void GenerateManifest(ModuleSampler group)
        {
            ModuleConstraintsManifestBuilder builder = Pool.Rent <ModuleConstraintsManifestBuilder>();

            builder.Process(group.slotModel, group.manifestID);

            builder.Release();

            //WFCUtilities.GenerateManifest((target as SlotGroup).manifestID);
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            ModuleSampler group = (ModuleSampler)target;

            if (group.slotModel == null)
            {
                EditorGUILayout.HelpBox("Slot constraints cannot be null.", MessageType.Error);
            }
            else if (!(group.slotModel is ModuleConstraintsModel))
            {
                EditorGUILayout.HelpBox("Slot constraints must be of type ModuleConstraintsModel.", MessageType.Error);
            }

            DrawDefaultInspector();

            //EditorGUILayout.HelpBox("Manifest : "+SceneManager.GetActiveScene().path +"/WFC/"+ group.clusterName + "", MessageType.Info);
            if (GUILayout.Button("Generate manifest files"))
            {
                GenerateManifest(group);
            }
        }