- Home /
ECS, IComponentData wont show in inspector
Hey people,
I just started exploring ECS, and i am trying to get a handle on it. So i am attempting to make a single cube rotate. I follow, kinda, the simple example of rotation given by unity. The following uses exactly the same structure as the IComponentData structs defined in the entities package.
using System;
using Unity.Entities;
[Serializable]
public struct RotationSpeed : IComponentData {
public float Value;
}
// This wrapper component is currently necessary to add ComponentData to GameObjects.
// In the future we want to make this wrapper component automatic.
public class RotationSpeedComponent : ComponentDataWrapper<RotationSpeed> { }
Problem is that unlike the ones in the entity package when i try to drag and drop them in the inspector it just informs me that it doesnt derive from monobehavior. I am trying to see why that happens, because it makes no sense to me
Answer by avvie · May 12, 2018 at 08:44 PM
So the problem was that my *.cs file was named RotationSpeed.cs The file should have the name of the wrapper class and not the struct
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Structuring view of my script/component in Inspector 0 Answers
Custom inspector, show string instead of component type 0 Answers
Unity can't see any scripts 0 Answers