Category:PKFxManager Assembly
The PKFxManager assembly contains the PKFxManager static class which contains the types and enums required for interoperability and acts as an interface between the plugin's managed C# code and native C++ code.
![]() |
Public Classes And Types
Attribute
This class encapsulates an attribute descriptor. It is used to get and set effect instances' attributes.
Constructors
Attribute(string name, float val) // Constructor for a float attribute.
Attribute(string name, Vector2 val) // Constructor for a float2 attribute.
Attribute(string name, Vector3 val) // Constructor for a float3 attribute.
Attribute(string name, Vector4 val) // Constructor for a float4 attribute.
Attribute(string name, int val) // Constructor for an int attribute.
Attribute(string name, int[] val) // Constructor for int2 to int4 attributes.
Arguments
name : The argument name as exposed in the PKFxFX component inspector window.
val : The attribute value.
AttributeDesc
This is an attribute descriptor. It contains an attribute's name, type and default values.
Constructors
AttributeDesc(S_AttributeDesc desc) // Meant for internal use only.
AttributeDesc(BaseType type, IntPtr name) // Meant for internal use only.
AttributeDesc(BaseType type, string name) // Meant for public use.
Arguments
type : The attribute's type. Must be one of PKFxManager.BaseType's enum value.
name : The attribute's name as exposed in the PKFxFX component inspector window.
SamplerDesc
This is an attribute sampler descriptor. It contains the Type, Name and Description of the sampler.
Constructors
SamplerDesc(SamplerDesc desc) // Meant for internal use only.
SamplerDesc(S_SamplerDesc desc) // Meant for internal use only.
SamplerDesc(string name, int type) // Meant for public use.
Arguments
name : The sampler's name as exposed in the PKFxFX component inspector window.
type : The sampler's type. Must be one of PKFxManager.ESamplerType's enum value.
Sampler
This class encapsulates a sampler descriptor. It is used to get and set effect instances' attribute samplers.
Constructors
Sampler(SamplerDesc dsc) // Meant for internal use only.
Sampler(string name, SamplerDescShapeBox dsc) //Constructor for a sampler Shape Box
Sampler(string name, SamplerDescShapeSphere dsc) //Constructor for a sampler Shape Sphere
Sampler(string name, SamplerDescShapeCylinder dsc) //Constructor for a sampler Shape Cylinder
Sampler(string name, SamplerDescShapeCapsule dsc) //Constructor for a sampler Shape Capsule
Sampler(string name, SamplerDescShapeMesh dsc) //Constructor for a sampler Shape Mesh
Sampler(string name, SamplerDescShapeMesh dsc) //Constructor for a sampler Shape MeshFilter
Sampler(string name, SamplerDescShapeSkinnedMesh dsc) //Constructor for a sampler Shape SkinnedMesh
Sampler(string name, AnimationCurve[] curvesArray) //Constructor for a sampler Curve
Sampler(string name, Texture2D texture, ETexcoordMode texcoordMode) //Constructor for a sampler Texture
Sampler(string name, string text) //Constructor for a sampler Text
SamplerDescShape
This is an sampler descriptor. It contains the shape Center, Position and Dimensions. For the meshes, it also contains the Mesh and the SamplingChannels.
Constructors
SamplerDescShapeBox() //Default Box (Vector3.zero, Vector3.one, Vector3.zero) SamplerDescShapeBox(Vector3 center, Vector3 dimension, Vector3 euler)
SamplerDescShapeSphere() //Default Sphere (Vector3.zero, 1.0f, 1.0f, Vector3.zero) SamplerDescShapeSphere(Vector3 center, float radius, float innerRadius, Vector3 euler)
SamplerDescShapeCylinder() //Default Cylinder (Vector3.zero, 1.0f, 1.0f, 1.0f Vector3.zero) SamplerDescShapeCylinder(Vector3 center, float radius, float innerRadius, float height, Vector3 euler)
SamplerDescShapeCapsule() //Default Capsule (Vector3.zero, 1.0f, 1.0f, 1.0f Vector3.zero) SamplerDescShapeCapsule(Vector3 center, float radius, float innerRadius, float height, Vector3 euler)
SamplerDescShapeMesh() //Default empty Mesh SamplerDescShapeMesh(Vector3 center, Vector3 dimension, Vector3 euler, Mesh mesh, int samplingChannels)
SamplerDescShapeMeshFilter() //Default empty MeshFilter SamplerDescShapeMeshFilter(Vector3 center, Vector3 dimension, Vector3 euler, MeshFilter mesh, int samplingChannels)
SamplerDescShapeSkinnedMesh() //Default empty SkinnedMesh SamplerDescShapeSkinnedMesh(Vector3 center, Vector3 dimension, Vector3 euler, SkinnedMeshRenderer skinnedMesh, int samplingChannels)
AudioCallback
public delegate IntPtr AudioCallback(int channel, IntPtr nbSamples);
Delegate type for setting audio data (spectrum and/or waveform).
Must return the address of a pinned array of 1024 float.
See Passing Custom Data to the Audio Samplers (Unity Plugin)
BaseType enum
Int, Int2, Int3, Int4, Float, Float2, Float3, Float4
ESamplerType enum
SamplerShape, SamplerCurve, SamplerImage, SamplerText, SamplerUnsupported
ETexcoordMode enum
Clamp, Wrap
EMeshChannels enum
Channel_Position = 0x1, Channel_Normal = 0x2, Channel_Tangent = 0x4, Channel_Velocity = 0x8, Channel_UV = 0x10, Channel_VertexColor = 0x20
Static Methods
PreLoadFxIFN
void PreLoadFxIFN(string path);
Attempts to load the effect located at path and its resources (textures, shaders, etc..).
path is relative to the PackFX' root.
The actual load/setup of the resources is done in the next PKFxRenderingPlugin component's OnPostRender event, so an active one is needed at the time of the load (this is mandatory because loading involves graphics stuff, which needs to be sync'd with Unity's rendering thread).
UnloadEffect
bool UnloadEffect(string path);
Attempts to unload the effect located at path and its resources (textures, shaders, etc..) and stops all its eventually remaining instances.
path is relative to the PackFX' root.
Returns true if the effects was unloaded successfully, false otherwise.
SetDelegateOnAudioSpectrumData
void SetDelegateOnAudioSpectrumData(IntPtr delegatePtr);
Takes a function pointer from a delegate (see Marshal.GetFunctionPointerForDelegate) to pass custom data to PopcornFX' audio samplers.
The delegate must be of type PKFxManager.AudioCallback.
See Passing Custom Data to the Audio Samplers (Unity Plugin)
SetDelegateOnAudioWaveformData
void SetDelegateOnAudioWaveformData(IntPtr delegatePtr);
Takes a function pointer from a delegate (see Marshal.GetFunctionPointerForDelegate) to pass custom data to PopcornFX' audio samplers.
The delegate must be of type PKFxManager.AudioCallback.
See Passing Custom Data to the Audio Samplers (Unity Plugin)
Reset
void Reset()
New v2.8 : No longer for internal use. Should be called manually when loading a new scene/level to flush the remaining particles.
Deprecated : For internal use only, this should never be called manually.
In the case where a scene reset is needed, simply delete all remaining PKFxRenderingPlugin components in the scene.
DeepReset
void DeepReset()
New v2.9 : Calls Reset(), unload all the FXs and clean the medium collection.
To be continued...
MonoBehaviour Components
PKFxSoundManager
Pages in category "PKFxManager Assembly"
This category contains only the following page.