-
Notifications
You must be signed in to change notification settings - Fork 7
Prefab patching #52
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
Merged
Merged
Prefab patching #52
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f4ac41c
Add composable prefab patch domain
jan-bures 2b0f842
Expose prefab patch schema to editor frontends
jan-bures ad38751
Stabilize prefab structure fingerprints
jan-bures 6fe6fdc
Support RectTransform prefab patch values
jan-bures 3967ebe
Discover prefab patches across loaded catalogs
jan-bures b4b0c7a
Restore prefab patch loading actions between play sessions
jan-bures 25b3fa4
Fix prefab patch runtime lifecycle
jan-bures 03c96e4
Load prefab patch manifests directly in editor
jan-bures ae9c9f0
Support arbitrary prefab patch components
jan-bures 5292e80
Derive prefab patch ownership from swinfo
jan-bures 9ed941a
Document exact Lua prefab path IDs
jan-bures f1d2b20
Merge prefab diagnostics into patch summary
jan-bures 79d719e
Add key-first prefab patch authoring
jan-bures 51a8bd5
Unify prefab patch runtime identity
jan-bures ef3d3fd
Discover prefab patches by mod labels
jan-bures 0fd2ad2
Fix Lua prefab patch terminal values
jan-bures 226beff
Document prefab patch Lua stubs
jan-bures f875cee
Merge dev into modding/prefab-patching
jan-bures 8479ae7
Address prefab patching review feedback and merge dev
jan-bures 44fec47
Update Patch Manager documentation link
jan-bures File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| using PatchManager.PrefabPatching; | ||
| using UnityEditor; | ||
|
|
||
| namespace PatchManager.Editor; | ||
|
|
||
| [InitializeOnLoad] | ||
| internal static class PrefabPatchPlayModeCleanup | ||
| { | ||
| static PrefabPatchPlayModeCleanup() | ||
| { | ||
| EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; | ||
| EditorApplication.playModeStateChanged += OnPlayModeStateChanged; | ||
| } | ||
|
|
||
| private static void OnPlayModeStateChanged(PlayModeStateChange state) | ||
| { | ||
| if (state == PlayModeStateChange.ExitingPlayMode) | ||
| PrefabPatchRuntime.ReleaseSessionResources(); | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Patch Manager | ||
| A mod for generic patching needs similar to KSP 1's Module Manager. | ||
|
|
||
| Documentation: https://ksp2community.github.io/PatchManagerDocs/ | ||
| Documentation: https://modding.ksp2redux.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using PatchManager.PrefabPatching; | ||
|
|
||
| namespace PatchManager.CSharpPatching | ||
| { | ||
| /// <summary> | ||
| /// Mod-scoped C# frontend for declarative prefab patches. | ||
| /// </summary> | ||
| public static class PrefabPatchingCSharpPatching | ||
| { | ||
| /// <summary> | ||
| /// Creates a prefab patch owned by the calling mod's swinfo identity. | ||
| /// </summary> | ||
| /// <summary> | ||
| /// Creates a prefab patch targeting a stock Addressables key. | ||
| /// Canonical bundle and CAB metadata are not part of imperative | ||
| /// authoring. | ||
| /// </summary> | ||
| public static PrefabPatchBuilder PatchPrefab( | ||
| this PmScope scope, | ||
| string name, | ||
| string address | ||
| ) => new(scope.ModId, name, address); | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, nit, but this should just link to modding.ksp2redux.org, the documentation here is out of data