Skip to content

Commit

Permalink
UnityPlugin: Release 2.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PopcornFX Bot committed Sep 13, 2024
1 parent fbc5ecb commit adbb08f
Show file tree
Hide file tree
Showing 60 changed files with 322 additions and 156 deletions.
6 changes: 3 additions & 3 deletions Native/EditorOnly/EditorNativeToManaged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern "C"
// Import effect callbacks:
void (POPCORN_TO_MANAGED_CONVENTION *_OnEffectDependencyFound)(const char *dependencyPath, int isLinearTexture) = null;
void (POPCORN_TO_MANAGED_CONVENTION *_OnEffectRendererFound)(const void *rendererDesc, int type, int idx) = null;
void (POPCORN_TO_MANAGED_CONVENTION* _OnEffectRendererLink)(int globalIdx, const char *currentQualityLevel, int uid) = null;
void (POPCORN_TO_MANAGED_CONVENTION* _OnEffectRendererLink)(int globalIdx, const char *currentQualityLevel, unsigned int uid) = null;
void (POPCORN_TO_MANAGED_CONVENTION *_OnEffectEventFound)(const SFxEventDesc *attribDesc) = null;
void (POPCORN_TO_MANAGED_CONVENTION *_OnEffectAttributeFound)(const SFxAttributeDesc *attribDesc) = null;
void (POPCORN_TO_MANAGED_CONVENTION *_OnEffectSamplerFound)(const SFxSamplerDesc *samplerDesc) = null;
Expand All @@ -40,7 +40,7 @@ extern "C"

MANAGED_TO_POPCORN_CONVENTION void SetDelegateOnEffectRendererLink(void *delegatePtr)
{
_OnEffectRendererLink = (void (POPCORN_TO_MANAGED_CONVENTION*)(int globalIdx, const char *currentQualityLevel, int uid))delegatePtr;
_OnEffectRendererLink = (void (POPCORN_TO_MANAGED_CONVENTION*)(int globalIdx, const char *currentQualityLevel, unsigned int uid))delegatePtr;
}

MANAGED_TO_POPCORN_CONVENTION void SetDelegateOnEffectEventFound(void *delegatePtr)
Expand Down Expand Up @@ -110,7 +110,7 @@ extern "C"
}
}

void OnEffectRendererLink(int globalIdx, const char *currentQualityLevel, int uid)
void OnEffectRendererLink(int globalIdx, const char *currentQualityLevel, unsigned int uid)
{
PK_SCOPEDPROFILE();
PK_ASSERT(CCurrentThread::IsMainThread());
Expand Down
2 changes: 1 addition & 1 deletion Native/EditorOnly/EditorNativeToManaged.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ extern "C"
void OnEffectRendererFound(const void *effectRdrDesc, int type, int idx);

MANAGED_TO_POPCORN_CONVENTION void SetDelegateOnEffectRendererLink(void* delegatePtr);
void OnEffectRendererLink(int globalIdx, const char *currentQualityLevel, int uid);
void OnEffectRendererLink(int globalIdx, const char *currentQualityLevel, unsigned int uid);

MANAGED_TO_POPCORN_CONVENTION void SetDelegateOnEffectEventFound(void *delegatePtr);
void OnEffectEventFound(const SFxEventDesc *attribDesc);
Expand Down
14 changes: 7 additions & 7 deletions Native/ManagedToNative.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ extern "C"

struct SDecalInfo
{
CFloat3 m_Position;
CFloat3 m_Scale;
CQuaternion m_Orientation;
CFloat3 m_Position;
CFloat3 m_Scale;
CQuaternion m_Orientation;
char *m_DiffuseMap;
char *m_EmissiveMap;
CFloat4 m_DiffuseColor;
CFloat4 m_EmissiveColor;
CFloat1 m_AtlasID;
int m_UID;
CFloat4 m_DiffuseColor;
CFloat3 m_EmissiveColor;
CFloat1 m_AtlasID;
int m_UID;
};

//----------------------------------------------------------------------------
Expand Down
26 changes: 13 additions & 13 deletions Native/NativeToManaged.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extern "C"
SRenderingFeatureLitDesc *m_LitRendering;

int m_CameraID;
int m_UID;
unsigned int m_UID;

SPopcornRendererDesc()
: m_CustomName(null)
Expand All @@ -84,7 +84,7 @@ extern "C"
, m_DrawOrder(0)
, m_LitRendering(null)
, m_CameraID(0)
, m_UID(-1)
, m_UID(0)
{
}
};
Expand Down Expand Up @@ -146,18 +146,18 @@ extern "C"
// Decals:
struct SDecalRendererDesc
{
int m_ShaderVariationFlags;
int m_ShaderVariationFlags;

const char *m_DiffuseMap;
const char *m_EmissiveMap;
const char *m_DiffuseMap;
const char *m_EmissiveMap;

CFloat4 m_DiffuseColor;
CFloat3 m_EmissiveColor;
CFloat4 m_DiffuseColor;
CFloat3 m_EmissiveColor;

int m_TextureAtlasCount;
CFloat4 *m_TextureAtlas;
int m_TextureAtlasCount;
CFloat4 *m_TextureAtlas;

int m_UID;
unsigned int m_UID;

SDecalRendererDesc()
: m_ShaderVariationFlags(0)
Expand All @@ -167,7 +167,7 @@ extern "C"
, m_EmissiveColor(CFloat3::ZERO)
, m_TextureAtlasCount(0)
, m_TextureAtlas(null)
, m_UID(-1)
, m_UID(0)
{
}
};
Expand Down Expand Up @@ -201,7 +201,7 @@ extern "C"
int m_TextureAtlasCount;
CFloat4 *m_TextureAtlas;

int m_UID;
unsigned int m_UID;
int m_DrawOrder;

ManagedBool m_TransformUVs_RGBOnly;
Expand All @@ -226,7 +226,7 @@ extern "C"
, m_AnimDescRendering(null)
, m_TextureAtlasCount(0)
, m_TextureAtlas(null)
, m_UID(-1)
, m_UID(0)
, m_DrawOrder(0)
, m_TransformUVs_RGBOnly(ManagedBool_False)
, m_UseVertexColor(ManagedBool_False)
Expand Down
4 changes: 2 additions & 2 deletions Native/RenderingIntegration/UnityBillboardingBatchPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ bool CUnityBillboardingBatchPolicy::_UpdateThread_IssueDrawCallDecal(const Drawe
diffuseColor = page->StreamForReading<CFloat4>(diffuseColorId);

// Emissive Color
TStridedMemoryView<const CFloat4> emissiveColor;
TStridedMemoryView<const CFloat3> emissiveColor;
bool hasEmissiveColor = emissiveColorId.Valid();

if (hasEmissiveColor)
{
emissiveColor = page->StreamForReading<CFloat4>(emissiveColorId);
emissiveColor = page->StreamForReading<CFloat3>(emissiveColorId);
}

// Atlas ID
Expand Down
2 changes: 1 addition & 1 deletion Native/RenderingIntegration/UnityRenderDataFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ PRendererCacheBase CUnityRenderDataFactory::UpdateThread_CreateRendererCache(con
}
else if (renderer->m_RendererType == Renderer_Decal)
{
succeeded = rendererCache->GameThread_SetupRenderer(static_cast<const CRendererDataDecal*>(renderer.Get()));
succeeded = rendererCache->GameThread_SetupRenderer(static_cast<const CRendererDataDecal*>(renderer.Get()));
}

rendererCache->SetAssetName(particleDesc->ParentEffect()->HandlerName());
Expand Down
10 changes: 5 additions & 5 deletions Native/RenderingIntegration/UnityRendererCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ class CParticleMaterialDescDecal
CStringId m_DiffuseMap;
CStringId m_EmissiveMap;
CFloat4 m_DiffuseColor;
CFloat3 m_EmissiveColor;
CFloat3 m_EmissiveColor;

bool InitFromRenderer(const CRendererDataDecal &renderer);
bool InitFromRenderer(const CRendererDataDecal &renderer);

bool operator == (const CParticleMaterialDescDecal &oth) const;
bool operator == (const CParticleMaterialDescDecal &oth) const;
};

struct SUnityMeshInfoPerView
Expand Down Expand Up @@ -350,7 +350,7 @@ class CUnityRendererCache : public CRendererCacheBase
, m_AssetName("")
, m_HasCustomMat(false)
, m_CustomMatID(-1)
, m_UID(-1)
, m_UID(0)
{
}

Expand Down Expand Up @@ -401,7 +401,7 @@ class CUnityRendererCache : public CRendererCacheBase

bool m_HasCustomMat;
int m_CustomMatID;
int m_UID;
unsigned int m_UID;
};
PK_DECLARE_REFPTRCLASS(UnityRendererCache);

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unity PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2019.4` to `2022.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`.
[Contact-us](https://www.popcornfx.com/contact-popcornfx/) to request access to the plugin for consoles.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unity PopcornFX Plugin
Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2019.4` to `2021.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`. [Contact-us](http://www.popcornfx.com/contact-us/) for more information.

Expand Down
2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx.hdrp/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unity PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2019.4` to `2022.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`.
[Contact-us](https://www.popcornfx.com/contact-popcornfx/) to request access to the plugin for consoles.
Expand Down
4 changes: 2 additions & 2 deletions com.persistant-studios.popcornfx.hdrp/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "com.persistant-studios.popcornfx.hdrp",
"description": "HDRP Materials for PopcornFX.",
"version": "2.20.0",
"version": "2.20.1",
"unity": "2020.2",
"unityRelease": "",
"displayName": "PopcornFX HDRP",
"dependencies": {
"com.unity.render-pipelines.core": "10.2.2",
"com.unity.render-pipelines.high-definition": "10.2.2",
"com.persistant-studios.popcornfx": "2.20.0"
"com.persistant-studios.popcornfx": "2.20.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unity PopcornFX Plugin
Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2017.4` to `2021.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`. [Contact-us](http://www.popcornfx.com/contact-us/) for more information.

Expand Down
2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx.urp/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unity PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2019.4` to `2022.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`.
[Contact-us](https://www.popcornfx.com/contact-popcornfx/) to request access to the plugin for consoles.
Expand Down
4 changes: 2 additions & 2 deletions com.persistant-studios.popcornfx.urp/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "com.persistant-studios.popcornfx.urp",
"description": "URP Materials for PopcornFX.",
"version": "2.20.0",
"version": "2.20.1",
"unity": "2020.2",
"unityRelease": "",
"displayName": "PopcornFX URP",
"dependencies": {
"com.unity.render-pipelines.core": "10.2.2",
"com.unity.render-pipelines.universal": "10.2.2",
"com.persistant-studios.popcornfx": "2.20.0"
"com.persistant-studios.popcornfx": "2.20.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unity PopcornFX Plugin
Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2017.4` to `2021.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`. [Contact-us](http://www.popcornfx.com/contact-us/) for more information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ private static void DisplayFeatureSetCategory(PKFxEditorCategory category)
if (PKFxSettings.EnablePopcornFXSound != soundValue)
{
PKFxSettings.EnablePopcornFXSound = soundValue;
PKFxManager.SetupPopcornFxSettings(false);
}
if (PKFxSettings.EnablePopcornFXSound)
{
Expand All @@ -624,6 +625,7 @@ private static void DisplayFeatureSetCategory(PKFxEditorCategory category)
if (PKFxSettings.EnablePopcornFXDecal != decalValue)
{
PKFxSettings.EnablePopcornFXDecal = decalValue;
PKFxManager.SetupPopcornFxSettings(false);
}

if (PKFxSettings.EnablePopcornFXDecal)
Expand Down
2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Unity PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **Unity** as a Plugin.
* **Version:** `v2.20.0`
* **Version:** `v2.20.1`
* **Unity:** `2019.4` to `2022.x`
* **Platforms:** `Windows`, `Linux`, `MacOS`, `iOS`, `Android`, `PS4`, `XboxOne`, `Switch`.
[Contact-us](https://www.popcornfx.com/contact-popcornfx/) to request access to the plugin for consoles.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Git LFS file not shown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Git LFS file not shown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx/Runtime/Plugins/OSX.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Git LFS file not shown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx/Runtime/Plugins/iOS.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Git LFS file not shown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx/Runtime/Plugins/x86.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit adbb08f

Please sign in to comment.