diff --git a/Assets/Editor/AutomationManager/AutomationManager.cs b/Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs similarity index 98% rename from Assets/Editor/AutomationManager/AutomationManager.cs rename to Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs index 44a75c8..233f759 100644 --- a/Assets/Editor/AutomationManager/AutomationManager.cs +++ b/Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs @@ -5,7 +5,7 @@ /// Example commandline usage: /// "C:\Program Files (x86)\Unity\Editor\Unity.exe" -batchMode -quit -nographics -projectPath C:\project -executeMethod AutomationManager.BuildAll /// -public class AutomationManager +public class OCAutomatedPlayerBuilder { [MenuItem ("Build/BuildAll")] static void BuildAll() diff --git a/Assets/Editor/AutomationManager/AutomationManager.cs.meta b/Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs.meta similarity index 78% rename from Assets/Editor/AutomationManager/AutomationManager.cs.meta rename to Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs.meta index c96eda7..7179b34 100644 --- a/Assets/Editor/AutomationManager/AutomationManager.cs.meta +++ b/Assets/Editor/AutomationManager/OCAutomatedPlayerBuilder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d694dadd34b10724f95643c7f1722ce9 +guid: d2b1f49b917d0374f8db01a371f6ace8 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/OpenCog Assets/Config/Resources/embodiment.txt b/Assets/OpenCog Assets/Config/Resources/embodiment.txt index 77d6526..93f0648 100644 --- a/Assets/OpenCog Assets/Config/Resources/embodiment.txt +++ b/Assets/OpenCog Assets/Config/Resources/embodiment.txt @@ -91,3 +91,4 @@ GOLD_STANDARD_FILENAME = GoldStandards.txt # This is the VisibilityMap tile side # half of the LocalSpaceMap2D grid side (xDim | yDim) is a good value VISIBILITY_MAP_TILES_PER_SIDE = 64 + diff --git a/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs b/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs similarity index 86% rename from Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs rename to Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs index 7d4a006..d00aa3d 100644 --- a/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs +++ b/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs @@ -32,8 +32,8 @@ namespace Automation /// #region Class Attributes -#endregion -public class AutomationManager //@TODO: coordinate with David and rename to OCAutomatedPlayerBuild +#endregion +public class OCAutomatedPlayerBuilder //@TODO: coordinate with David and rename to OCAutomatedPlayerBuild { ///////////////////////////////////////////////////////////////////////////// @@ -80,7 +80,7 @@ static void BuildAll() [MenuItem ("Build/BuildStandaloneLinux64Player")] static void BuildStandaloneLinux64Player() { - string[] scenes = { "Assets/Scenes/Game/Game.unity", "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; + string[] scenes = { "Assets/Scenes/Game/Game.unity"};//, "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneLinux64); BuildPipeline.BuildPlayer(scenes , "../Players/Unity3DGameWorldPlayer_Linux64" @@ -102,7 +102,7 @@ static void BuildStandaloneLinux64TestPlayer() [MenuItem ("Build/BuildStandaloneLinuxPlayer")] static void BuildStandaloneLinuxPlayer() { - string[] scenes = { "Assets/Scenes/Game/Game.unity", "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; + string[] scenes = { "Assets/Scenes/Game/Game.unity"};//, "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneLinux); BuildPipeline.BuildPlayer(scenes , "../Players/Unity3DGameWorldPlayer_Linux" @@ -112,7 +112,7 @@ static void BuildStandaloneLinuxPlayer() [MenuItem ("Build/BuildStandaloneWindowsPlayer")] static void BuildStandaloneWindowsPlayer() { - string[] scenes = { "Assets/Scenes/Game/Game.unity", "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; + string[] scenes = { "Assets/Scenes/Game/Game.unity"};//, "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows); BuildPipeline.BuildPlayer(scenes , "../Players/Unity3DGameWorldPlayer_Windows.exe" @@ -122,7 +122,7 @@ static void BuildStandaloneWindowsPlayer() [MenuItem ("Build/BuildStandaloneWindows64Player")] static void BuildStandaloneWindows64Player() { - string[] scenes = { "Assets/Scenes/Game/Game.unity", "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; + string[] scenes = { "Assets/Scenes/Game/Game.unity"};//, "Assets/Scenes/MainMenu/MainMenu.unity", "Assets/Scenes/BlockSetViewer/BlockSetViewer.unity" }; EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows64); BuildPipeline.BuildPlayer(scenes , "../Players/Unity3DGameWorldPlayer_Windows64.exe" diff --git a/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs.meta b/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs.meta similarity index 78% rename from Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs.meta rename to Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs.meta index 870eb47..f9c201d 100644 --- a/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/AutomationManager.cs.meta +++ b/Assets/OpenCog Assets/Scripts/OpenCog/Editor/Automation/OCAutomatedPlayerBuilder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 78a12263ab1356946bcd58a92f537e46 +guid: 5589b8aad2510364cbf0caf694feada4 MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/OpenCog Assets/Scripts/OpenCog/Generator/OCWorldGenerator.cs b/Assets/OpenCog Assets/Scripts/OpenCog/Generator/OCWorldGenerator.cs index 2c2a58b..e878f90 100644 --- a/Assets/OpenCog Assets/Scripts/OpenCog/Generator/OCWorldGenerator.cs +++ b/Assets/OpenCog Assets/Scripts/OpenCog/Generator/OCWorldGenerator.cs @@ -49,10 +49,23 @@ void Awake() { } } -#if (TEST_AND_EXIT) - Console.WriteLine("Level Loaded..."); - Application.Quit(); -#endif + TextAsset configFile = (TextAsset)Resources.Load("embodiment"); + if(configFile != null) OCConfig.Instance.LoadFromTextAsset(configFile); + OCConfig.Instance.LoadFromCommandLine(); + + string testValue = OCConfig.Instance.get("test"); + string quitValue = OCConfig.Instance.get("quit"); + + if(testValue == "internal_XGA") + { + Screen.SetResolution(1024, 768, false); + Console.WriteLine("Level Loaded..."); + } + + if(quitValue == "true") + { + Application.Quit(); + } } void Update() { diff --git a/Assets/OpenCog Assets/Scripts/OpenCog/Utility/OCConfig.cs b/Assets/OpenCog Assets/Scripts/OpenCog/Utility/OCConfig.cs index f6626cc..d8ad01c 100644 --- a/Assets/OpenCog Assets/Scripts/OpenCog/Utility/OCConfig.cs +++ b/Assets/OpenCog Assets/Scripts/OpenCog/Utility/OCConfig.cs @@ -156,6 +156,8 @@ public void OnEnable() // Testing and Buildbot Integration //_settings["TEST_AND_EXIT"] = "false"; //Use #define TEST_AND_EXIT instead... + _settings["test"] = "";// will be "internal_XGA" in case of buildbot + _settings["quit"] = "false";// should be "true" in case of buildbot } /// @@ -187,7 +189,7 @@ public void LoadFromFile(string fileName) } if (_settings.ContainsKey(tokens[0])) { - //if (Debug.isDebugBuild) Debug.Log(tokens[0] + "=" + tokens[1]); + if (Debug.isDebugBuild) Debug.Log(tokens[0] + "=" + tokens[1]); _settings[tokens[0]] = tokens[1]; } else @@ -243,7 +245,14 @@ public void LoadFromCommandLine() string[] keyValuePair = arg.Split(':'); if(keyValuePair != null && _settings.ContainsKey(keyValuePair[0])) { - _settings[keyValuePair[0]] = keyValuePair[1]; + if(keyValuePair[0] != "quit") + { + //if (Debug.isDebugBuild) Debug.Log(tokens[0] + "=" + tokens[1]); + _settings[keyValuePair[0]] = keyValuePair[1]; + } + else + _settings["quit"] = "true"; + } else { diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 80263ba..ea7e3c6 100644 Binary files a/ProjectSettings/EditorBuildSettings.asset and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 9e69393..8ccdb43 100644 Binary files a/ProjectSettings/ProjectSettings.asset and b/ProjectSettings/ProjectSettings.asset differ