Skip to content

Commit

Permalink
UnityPlugin: Release 2.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PopcornFX Bot committed Oct 7, 2024
1 parent adbb08f commit 7324b26
Show file tree
Hide file tree
Showing 38 changed files with 96 additions and 52 deletions.
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.1`
* **Version:** `v2.20.2`
* **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.1`
* **Version:** `v2.20.2`
* **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.1`
* **Version:** `v2.20.2`
* **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.1",
"version": "2.20.2",
"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.1"
"com.persistant-studios.popcornfx": "2.20.2"
}
}
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.1`
* **Version:** `v2.20.2`
* **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.1`
* **Version:** `v2.20.2`
* **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.1",
"version": "2.20.2",
"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.1"
"com.persistant-studios.popcornfx": "2.20.2"
}
}
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.1`
* **Version:** `v2.20.2`
* **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/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.1`
* **Version:** `v2.20.2`
* **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.

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.

Git LFS file not shown

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

Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public void OnDestroy()
if (m_CameraID >= 0)
m_RenderingPlugin.UnRegisterCamera(this);
Clean();
#if UNITY_EDITOR
if (m_IsEditorCamera)
SceneView.lastActiveSceneViewChanged -= OnSceneChanged;
#endif
}

public void OnEnable()
Expand Down Expand Up @@ -156,9 +160,10 @@ void Awake()
#if UNITY_EDITOR
if (GetComponent<PKFxRenderingPlugin>() != null)
{
m_Camera = SceneView.lastActiveSceneView.camera;
SceneView.lastActiveSceneViewChanged += OnSceneChanged;
m_IsEditorCamera = true;
m_EditorCameraOriginMask = m_Camera.cullingMask;
m_EditorCameraOriginMask = Tools.visibleLayers;
_SetEditorCamera(SceneView.lastActiveSceneView);
}
else
#endif
Expand Down Expand Up @@ -205,7 +210,7 @@ void Awake()
}
#endif
//Enable depth texture on mobile
if (PKFxSettings.EnableSoftParticles)
if (PKFxSettings.EnableSoftParticles && m_Camera != null)
m_Camera.depthTextureMode = DepthTextureMode.Depth;

m_EnableDistortion = PKFxSettings.EnableDistortion;
Expand All @@ -214,6 +219,9 @@ void Awake()

internal void SetCullingMask(short ID, LayerMask targetMask, LayerMask allPKMask)
{
if (m_Camera == null)
return;

m_CurrentCameraID = ID;
int cull = m_Camera.cullingMask;// << Origin Mask
cull = (cull & (~allPKMask)) | targetMask;
Expand All @@ -240,6 +248,37 @@ internal void SetCullingMask(short ID, LayerMask targetMask, LayerMask allPKMask
//----------------------------------------------------------------------------

#if UNITY_EDITOR
private void _SetEditorCamera(SceneView sceneView)
{
// Unregister old camera
if (m_RenderingPlugin != null && m_Camera != null)
{
if (m_CameraID >= 0 && m_RenderingPlugin != null)
m_RenderingPlugin.UnRegisterCamera(this);
}

if (sceneView == null)
m_Camera = null;
else
m_Camera = sceneView.camera;

// Register new camera
if (m_RenderingPlugin != null && m_Camera != null)
{
int id = m_RenderingPlugin.RegisterCamera(this);
if (id >= 0)
m_CameraID = (short)id;
}
}

//----------------------------------------------------------------------------
public void OnSceneChanged(SceneView oldScene, SceneView newScene)
{
Clean();
_SetEditorCamera(newScene);
}

//----------------------------------------------------------------------------
public void ResetEditorCameraMask()
{
Tools.visibleLayers = m_EditorCameraOriginMask;
Expand Down Expand Up @@ -305,6 +344,10 @@ void UpdateProjectionMatrix(bool isVR = false, Camera.StereoscopicEye eye = Came
public void UpdateCamera()
{
m_CurrentFrameID++;

if (m_Camera == null)
return;

UpdateFrame();

if (m_EnableDistortion || m_EnableBlur)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,10 @@ public bool UpdateCameraLayerIFN()
else
newCameraLayers[i] = PKFxSettings.Instance.GetCameraLayer(i);
}
CameraLayers = newCameraLayers;
CameraLayers = newCameraLayers; // UpdateLayerMask will be called in the setter
return true;
}
UpdateLayerMask();
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ internal partial class PKFxManagerImpl : object
//----------------------------------------------------------------------------

private const string m_UnityVersion = "Unity 2019.4 and up";
public const string m_PluginVersion = "2.20.1 for " + m_UnityVersion;
public const string m_PluginVersion = "2.20.2 for " + m_UnityVersion;
public static string m_CurrentVersionString = "";
public static bool m_IsStarted = false;
public static string m_DistortionLayer = "PopcornFX_Disto";
Expand Down
2 changes: 1 addition & 1 deletion com.persistant-studios.popcornfx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.persistant-studios.popcornfx",
"description": "PopcornFX is a 3D realtime FX Solution for Games & Interactive applications.",
"version": "2.20.1",
"version": "2.20.2",
"unity": "2019.3",
"displayName": "PopcornFX"
}
2 changes: 1 addition & 1 deletion download_3rd_party.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set OPEN_SOURCE_UNITY_REPO_PATH=%~dp0

bitsadmin /reset
bitsadmin /create third_party_download
bitsadmin /addfile third_party_download http://downloads.popcornfx.com/Plugins/ExternalLibs/ExternalLibs_UnityStore_2.20.1-21982_android_android64_arm64_ios64_x32_x64_android_ios_linux_macosx_vs2019.zip "%OPEN_SOURCE_UNITY_REPO_PATH%ExternalLibs.zip"
bitsadmin /addfile third_party_download http://downloads.popcornfx.com/Plugins/ExternalLibs/ExternalLibs_UnityStore_2.20.2-22062_android_android64_arm64_ios64_x32_x64_android_ios_linux_macosx_vs2019.zip "%OPEN_SOURCE_UNITY_REPO_PATH%ExternalLibs.zip"
bitsadmin /setpriority third_party_download "FOREGROUND"
bitsadmin /resume third_party_download

Expand Down
2 changes: 1 addition & 1 deletion download_3rd_party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ SCRIPT_PATH=$(readlink -f "$0")
OPEN_SOURCE_UNITY_REPO_PATH=$(dirname "$SCRIPT_PATH")

rm -rf "$OPEN_SOURCE_UNITY_REPO_PATH/ExternalLibs"
wget "http://downloads.popcornfx.com/Plugins/ExternalLibs/ExternalLibs_UnityStore_2.20.1-21982_android_android64_arm64_ios64_x32_x64_android_ios_linux_macosx_vs2019.zip" -O "$OPEN_SOURCE_UNITY_REPO_PATH/ExternalLibs.zip"
wget "http://downloads.popcornfx.com/Plugins/ExternalLibs/ExternalLibs_UnityStore_2.20.2-22062_android_android64_arm64_ios64_x32_x64_android_ios_linux_macosx_vs2019.zip" -O "$OPEN_SOURCE_UNITY_REPO_PATH/ExternalLibs.zip"
unzip "$OPEN_SOURCE_UNITY_REPO_PATH/ExternalLibs.zip"
rm -f "$OPEN_SOURCE_UNITY_REPO_PATH/ExternalLibs.zip"
Loading

0 comments on commit 7324b26

Please sign in to comment.