Esempio n. 1
0
        public EntityBuilder()
        {
            _initializer = DEFAULT_IT;

            EntityBuilderUtilities.CheckFields(ENTITY_VIEW_TYPE, NEEDS_REFLECTION);

            if (NEEDS_REFLECTION)
            {
                EntityView.InitCache();
            }
        }
Esempio n. 2
0
        public ComponentBuilder()
        {
            _initializer = DEFAULT_IT;

            EntityBuilderUtilities.CheckFields(ENTITY_COMPONENT_TYPE, IS_ENTITY_VIEW_COMPONENT);

            if (IS_ENTITY_VIEW_COMPONENT)
            {
                EntityViewComponentCache.InitCache();
            }
            else
            {
                if (ENTITY_COMPONENT_TYPE != EntityBuilderUtilities.ENTITY_STRUCT_INFO_VIEW && ENTITY_COMPONENT_TYPE.IsUnmanaged() == false)
                {
                    throw new Exception($"Entity Component check failed, unexpected struct type (must be unmanaged) {ENTITY_COMPONENT_TYPE}");
                }
            }
        }