Unity-Technologies / EntityComponentSystemSamples

Other
7.09k stars 1.6k forks source link

ecs 1.0 official documentation has error example, Too wrong guidance #268

Closed sunzwy closed 1 year ago

sunzwy commented 1 year ago
    using System;
    using Unity.Entities.Content;
    using UnityEngine;

    public class GameStarter : MonoBehaviour
    {
        public string remoteUrlRoot;
        public string initialContentSet;

        void Start()
        {
#if ENABLE_CONTENT_DELIVERY
            ContentDeliveryGlobalState.Initialize(remoteUrlRoot, Application.persistentDataPath + "/content-cache", initialContentSet, s =>
            {
                if (s >= ContentDeliveryGlobalState.ContentUpdateState.ContentReady)
                    LoadMainScene();
            });
#else
            LoadMainScene();
#endif
        }

        void LoadMainScene()
        {
            //content is ready here...
        }
    }

this is err!!!!!!!!!!!!!!!!!!!!!!,

must be use Load the cataLog

It's unprofessional

and u man do not tell us the ecs Built in EntitySceneBuildPlayerProcessor to build the relationship between resource and ecs weak id