There are sub scenes in the main scene, and there is a cube with a TestAuthoring script hanging on it
using Unity.Entities;
using UnityEngine;
class TestAuthoring : MonoBehaviour
{
public GameObject Prefab;
}
class TestAuthoringBaker : Baker<TestAuthoring>
{
public override void Bake(TestAuthoring authoring)
{
}
}
The TestAuthoring script for the cube has hung a prefab sphere, and Sphere and There is a SphereAuthoring script on Sphere.
using Unity.Entities;
using UnityEngine;
class SphereAuthoring : MonoBehaviour
{
}
class SphereAuthoringBaker : Baker<SphereAuthoring>
{
public override void Bake(SphereAuthoring authoring)
{
}
}
Now we cannot see SubScene loading anything in the scene.
When we remove Sphere Authoting on Sphere, it can load normally
If Sphere is not a prefab but in the scene, mount this Sphere on TestAuthoring, SubScene can also load normally
In fact, if Sphere is a prefab, it seems that mounting all scripts containing Baker will cause SubScene to fail to load properly, such as Physics Shape.
Only when SubScene is in the Open state can objects inside be seen.
How do I mount a Prefab with Baker script in the cube?





