Add editor window for creating named FUnity projects#345
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var projectData = ScriptableObject.CreateInstance<FUnityProjectData>(); | ||
| projectData.InitializeForNewProject(projectName, stageData); | ||
| var projectDataPath = $"{projectFolderPath}/{projectName}_ProjectData.asset"; | ||
| AssetDatabase.CreateAsset(projectData, projectDataPath); | ||
|
|
There was a problem hiding this comment.
Abort creation when project assets already exist
CreateProjectAssets always calls AssetDatabase.CreateAsset for the stage and project data paths without checking whether those asset files already exist, yet it still shows a success dialog and closes the window (lines 152-156). If the user enters a project name that matches an existing project under Assets/FUnity/Projects, CreateAsset logs an error and creates nothing, but the dialog reports that the project was created and the unsaved ScriptableObjects are simply dropped. Please guard against existing asset paths (or surface the failure) before showing success.
Useful? React with 👍 / 👎.
Summary
FUnityProjectDataTesting
Codex Task