|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
A StaticMesh is a piece of geometry that consists of a static set of polygons. Static Meshes can be translated, rotated, and scaled, but they cannot have their vertices animated in any way. As such, they are more efficient to render than other types of geometry such as USkeletalMesh, and they are often the basic building block of levels created in the engine. More...
Public Member Functions | |
Functions | |
| void | SetStaticMaterials (TArray< FStaticMaterial > InStaticMaterials) |
| const TArray< FStaticMaterial > & | GetStaticMaterials () const |
| void | SetbHasNavigationData (bool Value) |
| If true, mesh will have NavCollision property with additional data for navmesh generation and usage. Set to false for distant meshes (always outside navigation bounds) to save memory on collision data. | |
| void | SetbSupportUniformlyDistributedSampling (bool Value) |
| Mesh supports uniformly distributed sampling in constant time. Memory cost is 8 bytes per triangle. Example usage is uniform spawning of particles. | |
| void | SetbSupportPhysicalMaterialMasks (bool Value) |
| If true, complex collision data will store UVs and face remap table for use when performing PhysicalMaterialMask lookups in cooked builds. Note the increased memory cost for this functionality. | |
| void | SetbUseLegacyTangentScaling (bool Value) |
| void | SetbSupportRayTracing (bool Value) |
| If true, a ray tracing acceleration structure will be built for this mesh and it may be used in ray tracing effects. | |
| void | SetbAllowCPUAccess (bool Value) |
| If true, will keep geometry data CPU-accessible in cooked builds, rather than uploading to GPU memory and releasing it from CPU memory. This is required if you wish to access StaticMesh geometry data on the CPU at runtime in cooked builds (e.g. to convert StaticMesh to ProceduralMeshComponent). | |
| void | SetbSupportGpuUniformlyDistributedSampling (bool Value) |
| If true, a GPU buffer containing required data for uniform mesh surface sampling will be created at load time. It is created from the cpu data so bSupportUniformlyDistributedSampling is also required to be true. | |
| void | SetbGenerateMeshDistanceField (bool Value) |
| Whether to generate a distance field for this mesh, which can be used by DistanceField Indirect Shadows. This is ignored if the project's 'Generate Mesh Distance Fields' setting is enabled. | |
| Public Member Functions inherited from UStreamableRenderAsset | |
| void | SetForceMipLevelsToBeResident (float32 Seconds, int CinematicLODGroupMask=0) |
| Tells the streaming system that it should force all mip-levels to be resident for a number of seconds. | |
| void | SetNeverStream (bool Value) |
| bool | GetbGlobalForceMipLevelsToBeResident () const |
| Global and serialized version of ForceMiplevelsToBeResident. | |
| void | SetbGlobalForceMipLevelsToBeResident (bool Value) |
| Global and serialized version of ForceMiplevelsToBeResident. | |
| bool | GetNeverStream () const |
| Public Member Functions inherited from UObject | |
| bool | MarkPackageDirty () const |
| void | RemoveFromRoot () |
| bool | GetIsRooted () const |
| bool | IsTransient () const |
| bool | Modify (bool bAlwaysMarkDirty=true) |
| void | SetTransactional (bool bTransactional) |
| bool | IsSupportedForNetworking () const |
| UClass | GetClass () const |
| UObject | GetOuter () const |
| UObject | GetTypedOuter (TSubclassOf< UObject > Target) const |
| Traverses the outer chain searching for the next object of a certain type. | |
| UPackage | GetOutermost () const |
| UPackage | GetPackage () const |
| void | AddToRoot () |
| UWorld | GetWorld () const |
| FName | GetName () const |
| FString | GetFullName (const UObject StopOuter=nullptr) const |
| FString | GetPathName (const UObject StopOuter=nullptr) const |
| bool | IsA (const UClass Class) const |
| Returns true if this object is of the specified type, or a child of that type. | |
| void | SaveConfig () |
| void | LoadConfig () |
| void | ReloadConfig () |
| void | CopyScriptPropertiesFrom (const UObject OtherObject) |
| void | opCast (?&Address) const |
| FString | ToString () const |
Static Public Member Functions | |
Static Functions | |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UStreamableRenderAsset | |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UObject | |
| static UClass | StaticClass () |
Public Attributes | |
Collision | |
| bool | bCustomizedCollision |
| If the user has modified collision in any way or has custom collision imported. Used for determining if to auto generate collision on import. | |
| UStaticMesh | ComplexCollisionMesh |
ImportSettings | |
| UAssetImportData | AssetImportData |
| Importing data and options used for this mesh. | |
LodSettings | |
| FName | LODGroup |
| The LOD group to which this mesh belongs. | |
NaniteSettings | |
| FMeshNaniteSettings | NaniteSettings |
| Settings related to building Nanite data. | |
Navigation | |
| UNavCollisionBase | NavCollision |
| Public Attributes inherited from UStreamableRenderAsset | |
| bool | NeverStream |
| bool | bGlobalForceMipLevelsToBeResident |
| Global and serialized version of ForceMiplevelsToBeResident. | |
| int | NumCinematicMipLevels |
| Number of mip-levels to use for cinematic quality. | |
| Public Attributes inherited from UObject | |
| const UClass | Class |
| const UObject | Outer |
| const UPackage | Outermost |
| const UPackage | Package |
| const UWorld | World |
| const FName | Name |
| const bool | IsRooted |
StaticMesh | |
| int | LODForCollision |
| Specifies which mesh LOD to use for complex (per-poly) collision. Sometimes it can be desirable to use a lower poly representation for collision to reduce memory usage, improve performance and behaviour. Collision representation does not change based on distance to camera. | |
| int | LightMapCoordinateIndex |
| The light map coordinate index. | |
| UBodySetup | BodySetup |
| float32 | DistanceFieldSelfShadowBias |
| Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices. | |
| UThumbnailInfo | ThumbnailInfo |
| Information for thumbnail rendering. | |
| FVector | NegativeBoundsExtension |
| TArray< TObjectPtr< UAssetUserData > > | AssetUserData |
| Array of user data stored with the asset. | |
| int | LightMapResolution |
| The light map resolution. | |
| FVector | PositiveBoundsExtension |
| const FBox | BoundingBox |
| Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset. | |
| const FBoxSphereBounds | Bounds |
| Returns the number of bounds of the mesh. | |
| const int | NumLods |
| Returns the number of LODs used by the mesh. | |
| TArray< FStaticMaterial > | StaticMaterials |
| UStaticMeshDescription | GetStaticMeshDescription (int LODIndex) |
| Return a new StaticMeshDescription referencing the MeshDescription of the given LOD. | |
| void | AddSocket (UStaticMeshSocket Socket) |
| Add a socket object in this StaticMesh. | |
| void | BuildFromStaticMeshDescriptions (TArray< UStaticMeshDescription > StaticMeshDescriptions, bool bBuildSimpleCollision=false, bool bFastBuild=true) |
| Builds static mesh LODs from the array of StaticMeshDescriptions passed in. | |
| UStaticMeshSocket | FindSocket (FName InSocketName) const |
| Find a socket object in this StaticMesh by name. Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one. | |
| FBox | GetBoundingBox () const |
| Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset. | |
| FBoxSphereBounds | GetBounds () const |
| Returns the number of bounds of the mesh. | |
| UMaterialInterface | GetMaterial (int MaterialIndex) const |
| Gets a Material given a Material Index and an LOD number. | |
| int | GetMaterialIndex (FName MaterialSlotName) const |
| Gets a Material index given a slot name. | |
| int | GetMinimumLODForPlatform (FName PlatformName) const |
| void | GetMinimumLODForPlatforms (TMap< FName, int > &PlatformMinimumLODs) const |
| int | GetMinimumLODForQualityLevel (FName QualityLevel) const |
| void | GetMinimumLODForQualityLevels (TMap< FName, int > &QualityLevelMinimumLODs) const |
| void | GetMinLODForQualityLevels (TMap< EPerQualityLevels, int > &QualityLevelMinimumLODs, int &Default) const |
| int | GetNumLods () const |
| Returns the number of LODs used by the mesh. | |
| int | GetNumSections (int InLOD) const |
| Returns number of Sections that this StaticMesh has, in the supplied LOD (LOD 0 is the highest). | |
| int | GetNumTriangles (int LODIndex) const |
| Returns the number of triangles in the render data for the specified LOD. | |
| TArray< UStaticMeshSocket > | GetSocketsByTag (FString InSocketTag) const |
| Returns a list of sockets with the provided tag. | |
| void | SetMaterial (int MaterialIndex, UMaterialInterface NewMaterial) |
| Sets a Material given a Material Index. | |
| FName | AddMaterial (UMaterialInterface Material) |
| Adds a new material and return its slot name. | |
| bool | IsLODScreenSizeAutoComputed () const |
| void | RemoveSocket (UStaticMeshSocket Socket) |
| Remove a socket object in this StaticMesh by providing it's pointer. Use FindSocket() if needed. | |
| void | SetMinimumLODForPlatform (FName PlatformName, int InMinLOD) |
| void | SetMinimumLODForPlatforms (TMap< FName, int > PlatformMinimumLODs) |
| void | SetMinLODForQualityLevels (TMap< EPerQualityLevels, int > QualityLevelMinimumLODs, int Default=- 1) |
| Allow to override min lod quality levels on a staticMesh and it Default value (-1 value for Default dont override its value). | |
| void | SetNumSourceModels (int Num) |
| static UStaticMeshDescription | CreateStaticMeshDescription (UObject Outer=nullptr) |
| Create an empty StaticMeshDescription object, to describe a static mesh at runtime. | |
A StaticMesh is a piece of geometry that consists of a static set of polygons. Static Meshes can be translated, rotated, and scaled, but they cannot have their vertices animated in any way. As such, they are more efficient to render than other types of geometry such as USkeletalMesh, and they are often the basic building block of levels created in the engine.
@see https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/ @see AStaticMeshActor, UStaticMeshComponent
| FName AddMaterial | ( | UMaterialInterface | Material | ) |
Adds a new material and return its slot name.
| void AddSocket | ( | UStaticMeshSocket | Socket | ) |
Add a socket object in this StaticMesh.
| void BuildFromStaticMeshDescriptions | ( | TArray< UStaticMeshDescription > | StaticMeshDescriptions, |
| bool | bBuildSimpleCollision = false, | ||
| bool | bFastBuild = true ) |
Builds static mesh LODs from the array of StaticMeshDescriptions passed in.
|
static |
Create an empty StaticMeshDescription object, to describe a static mesh at runtime.
| UStaticMeshSocket FindSocket | ( | FName | InSocketName | ) | const |
Find a socket object in this StaticMesh by name. Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one.
| FBox GetBoundingBox | ( | ) | const |
Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset.
| FBoxSphereBounds GetBounds | ( | ) | const |
Returns the number of bounds of the mesh.
| UMaterialInterface GetMaterial | ( | int | MaterialIndex | ) | const |
| int GetMaterialIndex | ( | FName | MaterialSlotName | ) | const |
Gets a Material index given a slot name.
| int GetMinimumLODForPlatform | ( | FName | PlatformName | ) | const |
| int GetMinimumLODForQualityLevel | ( | FName | QualityLevel | ) | const |
| void GetMinLODForQualityLevels | ( | TMap< EPerQualityLevels, int > & | QualityLevelMinimumLODs, |
| int & | Default ) const |
| int GetNumLods | ( | ) | const |
Returns the number of LODs used by the mesh.
| int GetNumSections | ( | int | InLOD | ) | const |
Returns number of Sections that this StaticMesh has, in the supplied LOD (LOD 0 is the highest).
| int GetNumTriangles | ( | int | LODIndex | ) | const |
Returns the number of triangles in the render data for the specified LOD.
| TArray< UStaticMeshSocket > GetSocketsByTag | ( | FString | InSocketTag | ) | const |
Returns a list of sockets with the provided tag.
| const TArray< FStaticMaterial > & GetStaticMaterials | ( | ) | const |
| UStaticMeshDescription GetStaticMeshDescription | ( | int | LODIndex | ) |
Return a new StaticMeshDescription referencing the MeshDescription of the given LOD.
| bool IsLODScreenSizeAutoComputed | ( | ) | const |
| void RemoveSocket | ( | UStaticMeshSocket | Socket | ) |
Remove a socket object in this StaticMesh by providing it's pointer. Use FindSocket() if needed.
| void SetbAllowCPUAccess | ( | bool | Value | ) |
If true, will keep geometry data CPU-accessible in cooked builds, rather than uploading to GPU memory and releasing it from CPU memory. This is required if you wish to access StaticMesh geometry data on the CPU at runtime in cooked builds (e.g. to convert StaticMesh to ProceduralMeshComponent).
| void SetbGenerateMeshDistanceField | ( | bool | Value | ) |
Whether to generate a distance field for this mesh, which can be used by DistanceField Indirect Shadows. This is ignored if the project's 'Generate Mesh Distance Fields' setting is enabled.
| void SetbHasNavigationData | ( | bool | Value | ) |
If true, mesh will have NavCollision property with additional data for navmesh generation and usage. Set to false for distant meshes (always outside navigation bounds) to save memory on collision data.
| void SetbSupportGpuUniformlyDistributedSampling | ( | bool | Value | ) |
If true, a GPU buffer containing required data for uniform mesh surface sampling will be created at load time. It is created from the cpu data so bSupportUniformlyDistributedSampling is also required to be true.
| void SetbSupportPhysicalMaterialMasks | ( | bool | Value | ) |
If true, complex collision data will store UVs and face remap table for use when performing PhysicalMaterialMask lookups in cooked builds. Note the increased memory cost for this functionality.
| void SetbSupportRayTracing | ( | bool | Value | ) |
If true, a ray tracing acceleration structure will be built for this mesh and it may be used in ray tracing effects.
| void SetbSupportUniformlyDistributedSampling | ( | bool | Value | ) |
Mesh supports uniformly distributed sampling in constant time. Memory cost is 8 bytes per triangle. Example usage is uniform spawning of particles.
| void SetbUseLegacyTangentScaling | ( | bool | Value | ) |
| void SetMaterial | ( | int | MaterialIndex, |
| UMaterialInterface | NewMaterial ) |
| void SetMinimumLODForPlatform | ( | FName | PlatformName, |
| int | InMinLOD ) |
| void SetMinLODForQualityLevels | ( | TMap< EPerQualityLevels, int > | QualityLevelMinimumLODs, |
| int | Default = - 1 ) |
Allow to override min lod quality levels on a staticMesh and it Default value (-1 value for Default dont override its value).
| void SetNumSourceModels | ( | int | Num | ) |
| void SetStaticMaterials | ( | TArray< FStaticMaterial > | InStaticMaterials | ) |
|
static |
| UAssetImportData AssetImportData |
Importing data and options used for this mesh.
| TArray<TObjectPtr<UAssetUserData> > AssetUserData |
Array of user data stored with the asset.
| bool bCustomizedCollision |
If the user has modified collision in any way or has custom collision imported. Used for determining if to auto generate collision on import.
| UBodySetup BodySetup |
| const FBox BoundingBox |
Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset.
| const FBoxSphereBounds Bounds |
Returns the number of bounds of the mesh.
| UStaticMesh ComplexCollisionMesh |
| float32 DistanceFieldSelfShadowBias |
Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices.
| int LightMapCoordinateIndex |
The light map coordinate index.
| int LightMapResolution |
The light map resolution.
| int LODForCollision |
Specifies which mesh LOD to use for complex (per-poly) collision. Sometimes it can be desirable to use a lower poly representation for collision to reduce memory usage, improve performance and behaviour. Collision representation does not change based on distance to camera.
| FName LODGroup |
The LOD group to which this mesh belongs.
| FMeshNaniteSettings NaniteSettings |
Settings related to building Nanite data.
| UNavCollisionBase NavCollision |
| FVector NegativeBoundsExtension |
| const int NumLods |
Returns the number of LODs used by the mesh.
| FVector PositiveBoundsExtension |
| TArray<FStaticMaterial> StaticMaterials |
| UThumbnailInfo ThumbnailInfo |
Information for thumbnail rendering.