Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Reset Project command#27

Merged
chrisyarbrough merged 4 commits intochrisyarbrough:mainfrom
HardCodeDev777:main
Jan 23, 2026
Merged

Add Reset Project command#27
chrisyarbrough merged 4 commits intochrisyarbrough:mainfrom
HardCodeDev777:main

Conversation

@HardCodeDev777
Copy link
Contributor

Your project and its architecture are very cool, I really like it 👍

I decided to try implementing the Reset Project command from #14.

Summary

A new reset-project command that resets a Unity project by removing generated and cache files.
It keeps only Assets/, Packages/ and ProjectSettings/.

This provides a safe (with --dry-run 😁) and repeatable way to reset a project directly via UCLL.

@chrisyarbrough
Copy link
Owner

chrisyarbrough commented Jan 22, 2026

Cool, thanks for your contribution, @HardCodeDev777 ! Clean style and formatting!

I tested it and I believe it currently deletes a bit "too much". For example:

.gitignore
.sln.DotSettings (checked into git to share with team)
local ignored auth file (need to keep)
local ignored packages (not shared with team, e.g. special designer tool)
BuildPipeline folder (e.g. Jenkins scripts in project root)
...

It's similar to the git command which deletes all untracked files:

git glean -fd

Since that already exists, we don't need to provide this specific functionality in UCLL.

Let me propose inverting the logic:

  • Search for known Unity directories to delete: Library, obj, Logs, Temp, UserSettings (because window layout is one of the things that can corrupt, probably other user settings from packages as well)
  • Search for known Unity-generated files in project root: .sln, .csproj, .user (e.g. .sln.DotSettings.user)

Basically, we want to get rid of things that can corrupt project state and which users would sometimes manually delete to fix issues. I consider all user settings to fall into this category.

We can assume that most users will be using version control, so they can always use their vcs to delete everything untracked, but for UCLL it makes most sense to focus on specific Unity file system entries.

If you agree, please go ahead and implement the changes, I'll help you test (I have quite a few large-scale company projects that I can use). And thanks again! :)

@chrisyarbrough chrisyarbrough added the enhancement New feature or request label Jan 22, 2026
@chrisyarbrough chrisyarbrough self-requested a review January 22, 2026 23:53
Copy link
Owner

@chrisyarbrough chrisyarbrough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment: #27 (comment)

(ha, I'm still figuring out how GitHub works)

@chrisyarbrough chrisyarbrough linked an issue Jan 23, 2026 that may be closed by this pull request
@HardCodeDev777
Copy link
Contributor Author

Thanks for feedback!

I thought about this way of implementation, but I wasn't sure if only Library, obj, Logs, Temp, UserSettings, .vs, .idea and .sln, .csproj, .user files - maybe for other IDEs or OS there're will be another cache files, so I chose the easiest and 100% working way. Also I didn't know about git glean -fd command😁

But I agree, it makes more sense and I'll rework it accordingly👍

@HardCodeDev777
Copy link
Contributor Author

I’ve updated the implementation and also added --keep-user-settings flag.

@chrisyarbrough
Copy link
Owner

Thanks, I tested it and it works nicely. Let me do a few tiny formatting changes and also add a few more file extensions that I know about like .utmp, mono_crash*, and InitTestScene*. And then I'll merge.

@chrisyarbrough chrisyarbrough merged commit d62ea6a into chrisyarbrough:main Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reset Unity Project Command

2 participants