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

Reworks asset data and improves role system #1268

Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d798a94
Rework asset data and improve role system
joaoburatto Sep 27, 2023
08c4252
Rework the asset data system again
joaoburatto Sep 27, 2023
0d361f0
Remove auto generated files
joaoburatto Sep 27, 2023
65a0392
Change namespace used for generated scripts
joaoburatto Sep 27, 2023
afe450a
Remove generated code
joaoburatto Sep 27, 2023
7875386
Fix remaining issues
joaoburatto Sep 27, 2023
669b85a
Add missing settings to project settings, remove stuff from gitignore…
joaoburatto Oct 1, 2023
3991d3c
Fix merge issues
joaoburatto Oct 10, 2023
1930f8b
Move database assets to a folder
joaoburatto Oct 10, 2023
4e6e89c
Fix recipes
joaoburatto Oct 10, 2023
78d7a9b
Create a new system to reference world assets into inspector fields
joaoburatto Oct 10, 2023
a98271a
Bring back callbacks
joaoburatto Oct 13, 2023
0811ec4
Fix issues with merge, and add new assets to asset references
joaoburatto Oct 17, 2023
d0cc7d6
Fix scene buttons
joaoburatto Oct 17, 2023
059faf0
Fix spacing
joaoburatto Oct 17, 2023
df6e907
Documentation general work
joaoburatto Oct 17, 2023
a10965a
Fix issues with naming
joaoburatto Oct 26, 2023
44fc2ba
Add automatic ids to Item prefabs, fix crafting system and input issues
joaoburatto Nov 6, 2023
2d27686
Add more documentation
joaoburatto Nov 6, 2023
943d38b
Set prefabs as dirty when the _asset field is changed
joaoburatto Nov 6, 2023
6adb1c8
Fix issue with input on tilemap creator
joaoburatto Nov 7, 2023
6be6b62
Fix loading bar
joaoburatto Nov 7, 2023
7079072
Improve reimporting slowness
joaoburatto Nov 7, 2023
d73f939
Update prefabs and database assets naming
joaoburatto Nov 29, 2023
e9dc995
Fix databases and WorldAssetReferences
joaoburatto Dec 7, 2023
035df75
Fix errors with the database references
joaoburatto Dec 7, 2023
c296191
Fix missing references
joaoburatto Dec 7, 2023
2589b5e
Fix null ref
joaoburatto Dec 11, 2023
326f10e
Fix crafting systems
joaoburatto Dec 11, 2023
51c9d8a
Fix build errors
joaoburatto Dec 11, 2023
677af06
General review asked changes
joaoburatto Dec 12, 2023
ff37062
Fix issue with audio system references
joaoburatto Dec 14, 2023
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
Prev Previous commit
Next Next commit
Improve reimporting slowness
joaoburatto committed Dec 12, 2023
commit 7079072bde89c58e3035e716c291260739ff4934
Original file line number Diff line number Diff line change
@@ -99,14 +99,20 @@ private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObj
worldObjectAssetReference.Id = gameObject.name;
worldObjectAssetReference.Database = assetDatabaseName;

if (gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset))
if (!gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset))
{
worldObjectAsset.Asset = worldObjectAssetReference;
return worldObjectAssetReference;
}

if (worldObjectAsset.Asset == worldObjectAssetReference)
{
return worldObjectAssetReference;
}

worldObjectAsset.Asset = worldObjectAssetReference;

EditorUtility.SetDirty(gameObject);
EditorUtility.SetDirty(worldObjectAssetReference);

return worldObjectAssetReference;
}
}