EntityComponentSystemSamples icon indicating copy to clipboard operation
EntityComponentSystemSamples copied to clipboard

Multiple errors on step 4.7 of `EntitiesSamples/EntitiesTutorial`

Open Enteleform opened this issue 3 years ago • 5 comments

Unity:    2022.2.1f1
Entities: 1.0.0-pre.15

devenv_2023-01-08_04-39-55

CS0246
The type or namespace name 'LocalToWorldTransform' could not be found (are you missing a using directive or an assembly reference?)
D:\EntitiesTutorial\Assets\Scripts\Systems\TurretShootingSystem.cs
49
CS0103
The name 'm_LocalToWorldTransformFromEntity' does not exist in the current context
D:\EntitiesTutorial\Assets\Scripts\Systems\TurretShootingSystem.cs
17
CS0029
Cannot implicitly convert type 'Unity.Entities.ComponentLookup<Unity.Transforms.WorldTransform>' to 'Unity.Entities.ComponentLookup<LocalToWorldTransform>'
D:\EntitiesTutorial\Assets\Scripts\Systems\TurretShootingSystem.cs
38

Enteleform avatar Jan 08 '23 09:01 Enteleform

I have the same errors. Unity: 2022.2.0f1 Entities: 1.0.0-pre.15

Whaledevelop avatar Jan 21 '23 13:01 Whaledevelop

This is error in Readme. Checked script from tutorial, it is working well. Need to change LocalToWorldTransform to WorldTransform and m_LocalToWorldTransformFromEntity to m_WorldTransformLookup in code snippet in Readme

Whaledevelop avatar Jan 21 '23 13:01 Whaledevelop

By the way on step 8.3 similar problem - need m_ShootingLookup.Update(ref state); instead of m_TurretActiveFromEntity.Update(ref state);

Whaledevelop avatar Jan 21 '23 16:01 Whaledevelop

I also had this issue. Someone should update the code displayed in the readme's step 4's TurretShootingSystem.cs to match the code from the tutorial step sample projects: https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/EntitiesSamples/EntitiesTutorial/TutorialContent/Step_4/Scripts/Systems/TurretShootingSystem.cs

brent777777777777777 avatar Mar 30 '23 18:03 brent777777777777777

Annnnd step 9.3 has an error as well: var tankTransform = GetComponent<LocalToWorld>(Target); should be var tankTransform = SystemAPI.GetComponent<LocalToWorld>(Target);

brent777777777777777 avatar Mar 30 '23 21:03 brent777777777777777