- Home /
(Dots) Property attributes not working for IComponentData
Hey guys,
In my IComponentData
struct it seems that the [Header]
, [Serializefield]
, [HideInInspector]
don't work.
Does someone know how i can fix this?
Answer by andrew-lukasik · Jun 01 at 03:02 PM
These property attributes were designed for UnityEngine.Object
serialization system and Dots uses none of that.
But what's more important here - if you ever find yourself constructing huge IComponentData
where you even need those attributes just to manage the clutter - you're making a pretty serious technical mistake.
DOD core thesis is that memory layout is important for performance. OOP pretends memory layout doesn't matter. So there is much to unlearn if you wish to succeed with Dots.
TL;DR: Another
IComponentData
is your[Header]
here. What you need to do is to split all this data in many small, specializedIComponentData
.
Your answer
Follow this Question
Related Questions
Is RequireComponent[typeof(CustomScript)] possible? 2 Answers
[OnSerialize] and other events doesn't work 0 Answers
alternative for header atrribute for enums 1 Answer
Is it posible to edit MonoScript attributes from editor? 1 Answer
ECS/Dots: How do get combined data of component values/make this accessible to all entities? 2 Answers