Hello i want to extend a component from an interface that i defined like this:
using UnityEngine;
using System.Collections;
using Unity.Entities;
public interface IGizmosComponent : IComponentData
{
public void DrawGizmos();
}
using UnityEngine;
using System.Collections;
using Unity.Entities;
using Unity.Transforms;
using Unity.Mathematics;
public struct GizmosDrawCubeComponent : IGizmosComponent
{
public float3 Position;
public float3 Sizes;
public void DrawGizmos()
{
Gizmos.DrawCube(new Vector3(this.Position.x, this.Position.y, this.Position.z), new Vector3(this.Sizes.x, this.Sizes.y, this.Sizes.z));
}
}
But when i use this it throws an error
ArgumentException: Unknown Type:IGizmosComponent All ComponentType must be known at compile time. For generic components, each concrete type must be registered with [RegisterGenericComponentType].