I’m still working on it but I’ll make sure to write another article/guide when I make any significant progress. I did stumble into some hurdles and errors here and there while trying to make a simple NPC generator. Blob Assets are a great way of storing data when working with Unity’s DOTS and there are still a lot to learn. Scriptable Objects are a type of class in Unity that can be used to create multiple instances of a script that each contain their own unique values. This is just the creation logicĪnd that’s it. since that is already handled in the BlobAssetUtils. We don't have to worry about "storing" the created array to the blob asset here Public class TestGameDataSystem : GameObjectConversionSystem ") Showing a list of ScriptableObjects on Inspector dullman Joined: Posts: 29 Hello I have a few lists of custom classes derived from ScriptableObjects and i want to display it on Inspector to easily add/remove items from list, I found an article which describe it for single Item, but what i want is to use List. If you’re encountering this error (I encountered this with the packages – Entities 0.17.0-preview.42 and Hybrid Renderer 0.11.0-preview.44 – other dependent packages should update accordingly): Jumping in, the best use case for Blob Assets is converting Scriptable Objects (designer-friendly and can be edited in Unity’s editor) to data that can be used in your jobs with burst. The code here is stable with the packages – Entities 0.16.0-preview.21 and Hybrid Renderer 0.8.0-preview.19. Also, check Unity’s test scripts regarding Blob Assets, they help a lot in understanding how things work.īefore we start – for context, I’m making an NPC generator as a test project for studying ECS. And Code Monkey created an easy-to-understand video, “What are Blob Assets?”. If you want to learn more about getting started with blob assets, Marnel from Squeaky Wheel wrote a guide to help you out. It’s also important to note that you can only use blittable types in your blob assets, and BlobString or FixedString if you want to use strings. Meaning, you can use these in running parallel jobs, which is really important for creating performant systems using Unity’s DOTS. Today, I’m going to share with you how to convert scriptable objects to Blob Assets and also share a utility class that I created while studying Blob Assets.įirst off, let’s quickly define what is a blob asset – it’s an immutable data that can be accessed by your systems across multiple threads. So, you want to convert scriptable objects to data that you can use in your ECS systems – but, you can’t directly access SOs using pure ECS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |