I’m in the process of upgrading our project to 1.0. I’m having problems in the “remove GenerateAuthoringComponent” step. I’d like the entity references to still be correct. Before I proceed, I’d like to see generated authoring component and try to use that to see if it keeps the references. I’m talking about this part:
look into :
%PROJECT_PATH%\Temp\GeneratedCode\Assembly-CSharp
using System;
using Unity.Entities;
[GenerateAuthoringComponent]
[Serializable]
public struct Prefab : IComponentData
{
public Entity value;
}
turns into :
#line 1 "C:\GitHub\Project\Temp\GeneratedCode\Assembly-CSharp\Prefab__AuthoringComponent_1404783755.g.cs"
[UnityEngine.DisallowMultipleComponent]
[global::System.Runtime.CompilerServices.CompilerGenerated]
[System.SerializableAttribute]
public class PrefabAuthoring : UnityEngine.MonoBehaviour, Unity.Entities.IConvertGameObjectToEntity, Unity.Entities.IDeclareReferencedPrefabs
{
public UnityEngine.GameObject value;
public void Convert(Unity.Entities.Entity __entity, Unity.Entities.EntityManager __dstManager, GameObjectConversionSystem __conversionSystem)
{
Prefab component = default(Prefab);
component.value = __conversionSystem.GetPrimaryEntity(value);
__dstManager.AddComponentData(__entity, component);
}
public void DeclareReferencedPrefabs(global::System.Collections.Generic.List<UnityEngine.GameObject> __referencedPrefabs)
{
Unity.Entities.Hybrid.Internal.GeneratedAuthoringComponentImplementation.AddReferencedPrefab(__referencedPrefabs, value);
}
}
1 Like
Thanks!