コード例 #1
0
        public void SaveEntity(LexiconEntity entity)
        {
            //Debug.Log("SaveEntity");

            if (assemblyReload)
            {
                //Debug.Log("Trying to save entity on assembly reload, this is not safe!");
                entityToSave = entity;
            }
            else
            {
                SyncQueue assetsQueue = ScriptableObject.CreateInstance <SyncQueue>();

                assetsQueue.Enqueue(ValidateEntity.CreateInstance(entity));

                List <LexiconIntent> intents = GetAllIntents();

                foreach (LexiconIntent intent in intents)
                {
                    if (intent.UsesEntity(entity))
                    {
                        //Debug.Log("  Generate strings for " + intent.intentName);
                        assetsQueue.Enqueue(GenerateIntentStrings.CreateInstance(intent));
                    }
                }

                assetsQueue.Process();

                generateAssetsQueues.Add(assetsQueue);
            }
        }
コード例 #2
0
        public void SaveIntent(LexiconIntent intent)
        {
            //Debug.Log("SaveIntent");

            SyncQueue assetsQueue = ScriptableObject.CreateInstance <SyncQueue>();

            assetsQueue.Enqueue(ValidateIntent.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateIntentStrings.CreateInstance(intent));
            assetsQueue.Process();

            generateAssetsQueues.Add(assetsQueue);
        }
コード例 #3
0
        public void CreateDefaultAction(LexiconIntent intent)
        {
            //Debug.Log("CreateAction");

            SyncQueue assetsQueue = ScriptableObject.CreateInstance <SyncQueue>();

            assetsQueue.Enqueue(GenerateActionPrefab.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateIntentStrings.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateActionScript.CreateInstance(intent));
            assetsQueue.Enqueue(ReloadSyncAction.CreateInstance());
            assetsQueue.Enqueue(UpdateActionPrefab.CreateInstance(intent));

            assetsQueue.Process();

            generateAssetsQueues.Add(assetsQueue);
        }