[Tip] Saving the TaskListSO

You don’t have to have the GUID of the taskListSO, you can use:

EditorUtility.SetDirty(taskListSO);
AssetDatabase.SaveAssetIfDirty(taskListSO);

and it works. I definitely prefer this specific save to a broad, generic asset save.

3 Likes

That is very useful to know and a lot less hassle than grabbing the actual GUID. Thanks for pointing this out @MajorGonzo. I may go back to the video and mention this.

Gary, one more thing…I didn’t use the

AssetDatabase.Refresh();

and it worked fine so I looked at the docs for that to make sure I wasn’t missing something, and I don’t think it applies to what we are doing. The docs say its for importing any changed assets, and we’re not doing that (see their example). Am I still missing something?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms