Skip to content

Game.Prefabs.BaseProperties

Assembly: Assembly-CSharp (typical Unity game assembly — may vary)
Namespace: Game.Prefabs

Type: class

Base: ComponentBase

Summary:
Component used on prefab definitions to reference a base render prefab and to control whether minimum bounds are used. It exposes a RenderPrefab reference that is treated as a dependency when collecting prefab dependencies. The class is annotated with a ComponentMenu attribute so it appears in the editor's component menu under "Rendering/". The component does not add additional ECS archetype or prefab components by itself.


Fields

  • public RenderPrefab m_BaseType
    Holds a reference to another prefab (a render prefab) that this prefab depends on. When GetDependencies is called, this field is added to the provided dependency list if it is not null.

  • public bool m_UseMinBounds
    Flag that indicates whether the prefab should use minimum bounds logic (game-specific behavior). The class stores this value but does not implement any bounds logic itself — that is handled elsewhere in the rendering/prefab system.

Properties

  • None declared in this class. (All functionality is exposed through public fields and overridden methods.)

Constructors

  • public BaseProperties()
    Default parameterless constructor (implicit). Initializes the component instance; no custom construction logic is present in the source.

Methods

  • public override void GetDependencies(List<PrefabBase> prefabs)
    Checks m_BaseType and, if it is not null, adds it to the provided prefabs list. Calls base.GetDependencies(prefabs) first to preserve any dependency gathering implemented in the base class.

  • public override void GetArchetypeComponents(HashSet<ComponentType> components)
    Override that intentionally does nothing — this component does not contribute additional ECS archetype components.

  • public override void GetPrefabComponents(HashSet<ComponentType> components)
    Override that intentionally does nothing — this component does not contribute additional prefab component types.

Usage Example

// Example: attaching BaseProperties to a prefab and collecting dependencies
var baseProps = new BaseProperties();
baseProps.m_BaseType = someRenderPrefab; // assign a RenderPrefab reference
baseProps.m_UseMinBounds = true;

var dependencies = new List<PrefabBase>();
baseProps.GetDependencies(dependencies);

// 'dependencies' will contain 'someRenderPrefab' if it was non-null