Description
The NotCloned
field is a member of the ComponentFlags
enumeration in the Sandbox API. It is used to indicate that a component should not be serialized when an object is cloned. This is particularly useful in scenarios where certain components should remain unique to their original instance and not be duplicated during cloning operations.
Usage
Use the NotCloned
flag when you want to ensure that a component is not included in the serialization process during cloning. This can help maintain the integrity of components that should not be shared across cloned instances.
Example
// Example of using ComponentFlags.NotCloned
public class MyComponent : Component
{
public MyComponent()
{
// Set the component flags to NotCloned
this.Flags = ComponentFlags.NotCloned;
}
}