menu_bookDocumentation

ComponentFlags: Hidden, NotSaved, NotNetworked, NotCloned — Controlling Component Behavior

calendar_today May 4, 2026 schedule ~1 min read person patrickjr verified 52

ComponentFlags: Controlling Component Serialization, Networking, and Visibility

ComponentFlags is a flags enum on Component.Flags that controls how a component behaves in the editor, serialization, and networking.

Values

FlagValueEffect
Hidden1Hide this component in the component inspector
NotSaved2Don't save this component to disk
Error4Marks the component as having an error
Loading8Component is loading (not fully implemented)
Deserializing16Component is currently being deserialized
NotEditable32Cannot be edited in the inspector (not fully implemented)
NotNetworked64Keep local — don't include this component in the scene snapshot
NotCloned256Don't serialize this component when cloning the GameObject
ShowAdvancedProperties512Show advanced properties in the inspector

Usage

CSHARP
// Hide a component from the inspector (e.g., internal helper component)
Flags |= ComponentFlags.Hidden;

// Prevent a component from being networked as part of the scene snapshot
Flags |= ComponentFlags.NotNetworked;

// Prevent a component from being included when the GameObject is cloned
Flags |= ComponentFlags.NotCloned;

// Don't save this component to disk
Flags |= ComponentFlags.NotSaved;

Important: NotNetworked

ComponentFlags.NotNetworked prevents the component from being included in the scene snapshot sent to clients. This is useful for server-only components or components that manage local state that shouldn't be replicated.

Note: This only affects NetworkMode.Snapshot objects. For NetworkMode.Object objects, [Sync] properties control what is synchronized.

Was this helpful?