Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG-1638] Removes old state system #141

Merged
merged 22 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ artifacts/
*.swp
.idea

src/RGUnityBots/Assets/RegressionGames/Resources/RGBots.asset*

# Unity specific ignores appear in '.gitignore' files within the Unity projects themselves
# This is because the default Unity gitignore (https://github.com/github/gitignore/blob/main/Unity.gitignore) only works when at the root of the Unity project
# Instead of messing with it, we just put it in each Project so it works as expected

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,52 +35,6 @@ private static string ZipPathForBot(long botId)
return Path.Combine(PARENT_DIRECTORY_PATH, ZIP_TEMP_FOLDER_NAME, $"Bot_{botId}.zip");
}

[MenuItem("Regression Games/Create New Bot")]
private static void CreateNewBot()
{
// Create our bot folder if it doesn't exist
RGEditorUtils.CreateAllAssetFolders(BOTS_PATH);

// prompt the user to choose a folder
var newBotPath = EditorUtility.SaveFilePanelInProject(
"Create a new RegressionGames Bot",
"NewRGBot",
"",
"Enter the name of the new bot.",
BOTS_PATH);
if (string.IsNullOrEmpty(newBotPath))
{
// The user cancelled
return;
}

var botName = RGEditorUtils.GetAssetPathLeaf(newBotPath);
var botParentPath = RGEditorUtils.GetAssetPathParent(newBotPath);
RGEditorUtils.CreateAllAssetFolders(botParentPath);
var botFolderGuid = AssetDatabase.CreateFolder(botParentPath, botName);
var botFolder = AssetDatabase.GUIDToAssetPath(botFolderGuid);

// Create the bot assets
var botId = RGSettings.GetOrCreateSettings().GetNextBotId();
_this.CreateNewBotAssets(botFolder, botName, botId);

// Make sure we can find the entry point.
var entryPointPath = $"{botFolder}/BotEntryPoint.cs";
var entryPointScript = AssetDatabase.LoadAssetAtPath<MonoScript>(entryPointPath);
if (entryPointScript != null)
{
// If we can, ask the user if they want to open it.
var openNow = EditorUtility.DisplayDialog("Bot Created",
$"Created a new RegressionGames bot at {newBotPath}. Would you like to open the entrypoint script now?",
"Yes",
"No");
if (openNow)
{
AssetDatabase.OpenAsset(entryPointScript);
}
}
}

/**
* Synchronizes local bots with RG remote server if connected.
* This is a long one, it...
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading