Game.Prefabs.NetPieceTiling
Assembly:
Assembly-CSharp.dll
Namespace:
Game.Prefabs
Type:
public class
Base:
ComponentBase
Summary:
NetPieceTiling is a small component intended for net piece prefabs (road/rail/utility pieces). It exposes a single boolean flag that controls whether texture tiling is disabled for that net piece. The class overrides several prefab-related methods (dependency/component collection) but does not add additional behavior beyond calling the base implementation for dependencies — effectively acting as a lightweight marker/configuration component for prefab processing and editor/inspector use.
This component is marked with a ComponentMenu attribute: [ComponentMenu("Net/", new Type[] { typeof(NetPiecePrefab) })] which places it under the "Net/" menu and associates it with NetPiecePrefab in the editor.
Fields
public bool m_DisableTextureTiling
Controls whether texture tiling is disabled for the net piece. When true, the prefab/system rendering or prefab-build logic should not apply automatic texture tiling for this piece. This field is intended to be set in the prefab/inspector or via code before spawning/processing the prefab.
Properties
- None.
There are no public or private C# properties defined on this class.
Constructors
public NetPieceTiling()
No explicit constructor is defined in the source; the default parameterless constructor is used.
Methods
-
public override void GetDependencies(List<PrefabBase> prefabs)
Calls base.GetDependencies(prefabs). Intended to allow this component to add any prefab dependencies (other prefabs that must be loaded) to the provided list. In this implementation it does not add any dependencies itself. -
public override void GetPrefabComponents(HashSet<ComponentType> components)
Intended to add ECS ComponentType entries that this prefab requires when instantiated as a prefab. The override is empty here, so it currently registers no additional components. -
public override void GetArchetypeComponents(HashSet<ComponentType> components)
Intended to add ECS ComponentType entries needed for the archetype created from this prefab. The override is empty in this class.
Usage Example
// Example: Create/modify a NetPieceTiling on a prefab instance (pseudo-code)
var tiling = prefab.GetComponent<Game.Prefabs.NetPieceTiling>();
if (tiling == null) {
tiling = prefab.AddComponent<Game.Prefabs.NetPieceTiling>();
}
// Disable automatic texture tiling for this net piece
tiling.m_DisableTextureTiling = true;
// The prefab processing pipeline can query this flag and adjust material UV handling accordingly.
Notes for modders: - Because GetPrefabComponents and GetArchetypeComponents are empty, this component functions primarily as a data/configuration/marker component for editor and prefab processing logic elsewhere in the codebase. If you need this component to introduce ECS components at spawn time, extend these methods to add the required ComponentType entries. - The ComponentMenu attribute places this component under the "Net/" menu and links it with NetPiecePrefab for easier attachment in the editor.