Hey all, Im running into a strange issue where Unity claims my Systems class name is already defined in the namespace. However, i have quadruple checked it is not in the namespace and even tried just changing the name to dumb words. I also tried putting a namespace around the script to try and isolate it, but the error persists. Here is my script
The error is from the ShipInputSystem
`
using Unity.Entities;
using Unity.NetCode;
using UnityEngine;
namespace Ship
{
public struct ShipInput : IInputComponentData
{
public float yaw;
public float throttle;
public float pitch;
public float tilt;
public bool boost;
}
[DisallowMultipleComponent]
public class ShipAuthoring : MonoBehaviour
{
class Baking : Baker<ShipAuthoring>
{
public override void Bake(ShipAuthoring authoring)
{
AddComponent<ShipInput>();
}
}
}
public class ShipInputSystem : SystemBase
{
private PlayerControls controls;
public void OnCreate()
{
controls = new PlayerControls();
}
protected override void OnUpdate()
{
foreach (var playerInput in SystemAPI.Query<RefRW<ShipInput>>())
{
playerInput.ValueRW = default;
playerInput.ValueRW.yaw = controls.Player.Yaw.ReadValue<float>();
playerInput.ValueRW.throttle = controls.Player.Throttle.ReadValue<float>();
playerInput.ValueRW.pitch = controls.Player.Pitch.ReadValue<float>();
playerInput.ValueRW.tilt = controls.Player.Tilt.ReadValue<float>();
playerInput.ValueRW.boost = controls.Player.Boost.ReadValue<float>() > 0;
}
}
}
}`
and here is my error that will not go away regardless of the namespace or name of the ShipInputSystem class (I've tried naming it a bunch of random things like "StupidSystem" "UnityMakesMeMad" etc etc
Unity.Entities.SourceGen.SystemGenerator\Unity.Entities.SourceGen.SystemGenerator.SystemGenerator\Temp\GeneratedCode\Assembly-CSharp\ShipAuthoring__System_12858203020.g.cs(8,18): error CS0101: The namespace 'Ship' already contains a definition for 'ShipInputSystem'