Assembly: Sandbox.Game.dll

public class MyModStorageComponent: MyModStorageComponentBase, IMyComponentBase, IMyEntityComponentBase, IDictionary<Guid, string>, ICollection<KeyValuePair<Guid, string>>, IEnumerable<KeyValuePair<Guid, string>>, IEnumerable

Component that stores custom mod data for an entity. Shared by all mods. NOTE: Create an EntityComponents.sbc with your mod's GUIDs to make sure data is saved. This allows data to remain in the world file until the user removes the mod.

Events

Member Description
static OnAfterAddedToContainer Inherited from MyEntityComponentBase
BeforeRemovedFromContainer Inherited from IMyEntityComponentBase
BeforeRemovedFromContainer Inherited from MyEntityComponentBase

Properties

Member Description
Storage Store custom mod data here. Use a GUID unique to your mod. Use only system types, not custom types in mod script or game.
AttachSyncToEntity Inherited from MyEntityComponentBase
ComponentTypeDebugString Inherited from IMyEntityComponentBase
ComponentTypeDebugString Inherited from MyModStorageComponentBase
ComponentTypeDebugString Name of the base component type for debug purposes (e.g.: "Position")

Inherited from MyEntityComponentBase
Container Inherited from IMyEntityComponentBase
Container Inherited from MyEntityComponentBase
ContainerBase Inherited from IMyComponentBase
ContainerBase This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase.

Inherited from MyComponentBase
Count Inherited from MyModStorageComponentBase
Entity Inherited from IMyEntityComponentBase
Entity Inherited from MyEntityComponentBase
FailedOnSceneAdd Inherited from MyComponentBase
IsReadOnly Inherited from MyModStorageComponentBase
Item Inherited from MyModStorageComponentBase
Keys Inherited from MyModStorageComponentBase
RemoveExistingComponentOnNewInsert Inherited from IMyComponentBase
RemoveExistingComponentOnNewInsert Inherited from MyComponentBase
Values Inherited from MyModStorageComponentBase

Constructors

Member Description
MyModStorageComponent()

Methods

Member Description
Deserialize(MyObjectBuilder_ComponentBase)
GetValue(Guid)
IsSerialized()
RemoveValue(Guid)
Serialize(bool)
SetValue(Guid, string)
TryGetValue(Guid, out string)
Add(KeyValuePair<Guid, string>) Inherited from MyModStorageComponentBase
Add(Guid, string) Inherited from MyModStorageComponentBase
Clear() Inherited from MyModStorageComponentBase
Contains(KeyValuePair<Guid, string>) Inherited from MyModStorageComponentBase
ContainsKey(Guid) Inherited from MyModStorageComponentBase
CopyTo(KeyValuePair`2[], int) Inherited from MyModStorageComponentBase
Deserialize(MyObjectBuilder_ComponentBase) Inherited from IMyComponentBase
Deserialize(MyObjectBuilder_ComponentBase) Inherited from MyComponentBase
GetAs() Inherited from IMyComponentBase
GetAs() Inherited from MyComponentBase
GetEnumerator() Inherited from MyModStorageComponentBase
GetValue(Guid) Gets a value from the Storage dictionary with the specified key.

Inherited from MyModStorageComponentBase
Init(MyComponentDefinitionBase) Inherited from IMyComponentBase
Init(MyComponentDefinitionBase) Inherited from MyComponentBase
IsSerialized() Inherited from IMyComponentBase
IsSerialized() Tells the component container serializer whether this component should be saved

Inherited from MyComponentBase
OnAddedToContainer() Inherited from IMyComponentBase
OnAddedToContainer() Inherited from MyEntityComponentBase
OnAddedToContainer() Gets called after the container of this component changes

Inherited from MyComponentBase
OnAddedToScene() Inherited from IMyComponentBase
OnAddedToScene() CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already!

Inherited from MyComponentBase
OnBeforeRemovedFromContainer() Inherited from IMyComponentBase
OnBeforeRemovedFromContainer() Inherited from MyEntityComponentBase
OnBeforeRemovedFromContainer() Gets called before the removal of this component from a container

Inherited from MyComponentBase
OnRemovedFromScene() Inherited from IMyComponentBase
OnRemovedFromScene() CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene!

Inherited from MyComponentBase
Remove(KeyValuePair<Guid, string>) Inherited from MyModStorageComponentBase
Remove(Guid) Inherited from MyModStorageComponentBase
RemoveValue(Guid) Removes a value with the specified key from the Storage dictionary.

Inherited from MyModStorageComponentBase
Serialize(bool) Inherited from IMyComponentBase
Serialize(bool) Inherited from MyModStorageComponentBase
Serialize(bool) Inherited from MyComponentBase
SetContainer(IMyComponentContainer) Inherited from IMyComponentBase
SetContainer(IMyComponentContainer) Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself.

Inherited from MyComponentBase
SetValue(Guid, string) Stores a value with the specified key into the Storage dictionary.

Inherited from MyModStorageComponentBase
TryGetValue(Guid, out string) Tries to a value from the Storage dictionary with the specified key.

Inherited from MyModStorageComponentBase

Inheritance: MyComponentBase ˃ MyEntityComponentBase ˃ MyModStorageComponentBase

Implements: