Why is this not a thing yet ? any specifics reason why we can't do something like what's in the code block.
It Could help A Lot by avoiding redundancy and useless authoring components for nothing 🙂
Plus it could be compatible with addressable & Avoid Subscene Cluttering with SettingAuthoring overload.
[CreateAssetMenu(fileName = "GameTickSettings", menuName = "ScriptableObjects/GameTickSettings", order = 1)]
public class SoGameTickSettings : ScriptableObject, IGameSettings
{
public GameTickSettingsData Data;
public class GameTickSettingsBaker : Baker<SoGameTickSettings>
{
public override void Bake(SoGameTickSettings authoring)
{
Entity current = GetEntity(TransformUsageFlags.None);
AddComponent(current, authoring.Data);
}
}
[Serializable]
public struct GameTickSettingsData : IComponentData
{
public float TickLength;
}
}