Gorilla.Prefab
Unit Gorilla.Prefab.pasClasses
- TGorillaPrefab = class ( TCollectionItem )
- TGorillaPrefabCollection = class ( TOwnedCollection )
- TGorillaPrefabSystem = class ( TComponent )
TGorillaPrefab
A prefab acts as a template with all its components, property values, and child elements, from which you can create new prefab instances in the scene.
Ancestors
Members
Fields
- protected FName :
string
- protected FFileName :
string
- protected FOwnerComponent :
TComponent
- protected FDFM :
TStrings
- protected FStored :
Boolean
- protected FBuffer :
TList<System.Classes.TComponent>
- protected FOnCreateComponent :
TOnCreateComponentEvent
Methods
- public constructor Create ( ACollection : TCollection ) ;
- public destructor Destroy ( ) ;
- protected function GetDisplayName ( ) : string ; override;
- protected procedure SetDisplayName ( const AValue : string ) ; override;
- protected procedure DoOnCreateComponent ( AReader : TReader; AComponentClass : TComponentClass; var AComponent : TComponent ) ;
- protected procedure DoOnSetName ( AReader : TReader; AComponent : TComponent; var AName : string ) ;
- protected procedure DoOnFindComponentInstance ( AReader : TReader; const AName : string; var AInstance : Pointer ) ;
- protected procedure DoOnFindMethodInstance ( AReader : TReader; const AMethodName : string; var AMethod : TMethod; var Error : Boolean ) ;
- protected function DoReadComponents ( AStream : TStream; const AInstance : TComponent ) : TList<System.Classes.TComponent> ;
- public procedure Assign ( Source : TPersistent ) ; override;
- public function Load ( ) : TList<System.Classes.TComponent> ; virtual;
- public function LoadFromFile ( const AFileName : string ) : TList<System.Classes.TComponent> ; virtual;
- public function LoadFromStream ( const AStream : TStream; const AIsPrefabZ : Boolean = False ) : TList<System.Classes.TComponent> ; virtual;
- public procedure Save ( ) ; virtual;
- public procedure SaveToFile ( const AFileName : string ) ; virtual;
- public procedure SaveToStream ( const AStream : TStream ) ; virtual;
- public procedure Notification ( AComponent : TComponent; Operation : TOperation ) ;
Properties
- published DisplayName : string
- published FileName : string
- published OwnerComponent : TComponent
Link a component which is the root node of your prefab construct.
read FOwnerComponent
write FOwnerComponent - published DFM : TStrings
- published Stored : Boolean
TGorillaPrefabSystem
The Prefab system allows you to create, configure, and store a elements completely with all its components, property values, and child elements as a reusable collection. A prefab acts as a template from which you can create new prefab instances in the scene.
Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetPrefabs ( const AValue : TGorillaPrefabCollection ) ; virtual;
- protected procedure Notification ( AComponent : TComponent; Operation : TOperation ) ; override;
- public procedure AfterConstruction ( ) ; override;
- public function AddPrefab ( AName : string; AOwner : TComponent; const AFileName : string ) : TGorillaPrefab ; virtual;
- public procedure RemovePrefab ( AName : string ) ; virtual;
- public function IndexOfPrefab ( AName : string ) : Integer ; virtual;
- public function FindPrefab ( AName : string ) : TGorillaPrefab ; virtual;
- public procedure LoadAllPrefabs ( var AList : TObjectList<System.Classes.TComponent> ) ; virtual;
- public procedure SaveAllPrefabs ( ) ; virtual;
- public function FindComponentDeepSearch ( const AName : string ) : TComponent ;
- public function FindComponentDeepSearchByClass ( AClass : TClass ) : TComponent ;
- public procedure FindAllComponentsByClass ( AClass : TClass; var AReturn : TArray<System.Classes.TComponent> ) ;
- public function LogComponentHierarchy ( AIndent : string ) : string ;
- public procedure ReadPointField ( var AField : TPoint; Reader : TReader ) ;
- public procedure WritePointField ( AField : TPoint; Writer : TWriter ) ;
- public procedure ReadPointFField ( var AField : TPointF; Reader : TReader ) ;
- public procedure WritePointFField ( AField : TPointF; Writer : TWriter ) ;
- public procedure ReadPoint3DField ( var AField : TPoint3D; Reader : TReader ) ;
- public procedure WritePoint3DField ( AField : TPoint3D; Writer : TWriter ) ;
- public procedure ReadSize3DField ( var AField : TSize3D; Reader : TReader ) ;
- public procedure WriteSize3DField ( AField : TSize3D; Writer : TWriter ) ;
- public procedure ReadVector3DField ( var AField : TVector3D; Reader : TReader ) ;
- public procedure WriteVector3DField ( AField : TVector3D; Writer : TWriter ) ;
- public procedure ReadQuaternionField ( var AField : TQuaternion3D; Reader : TReader ) ;
- public procedure WriteQuaternionField ( AField : TQuaternion3D; Writer : TWriter ) ;
- public procedure ReadAlphaColorFField ( var AField : TAlphaColorF; Reader : TReader ) ;
- public procedure WriteAlphaColorFField ( AField : TAlphaColorF; Writer : TWriter ) ;
- public procedure ReadPlaneFField ( var AField : TPlaneF; Reader : TReader ) ;
- public procedure WritePlaneFField ( AField : TPlaneF; Writer : TWriter ) ;