Troubleshooting (Unity Plugin)
|! IMPORTANT ! This is a PopcornFX v1 page. PopcornFX v2 Unity plugin documentation can be found here|
Here is the list of known problems with the Unity Plugin. Please don't hesitate to send us your feedback and help improve the plugin.
See also : Identifying Errors with the Unity Plugin
No effects, no errors
=> Make sure you attached a PKFxRenderingPlugin component to your camera.
No effects : DllNotFoundException/EntryPointNotFoundException
=> On new installs, make sure the visual c++ 2013 redistributable package for your architecture is installed.
=> Make sure the native libraries for your system (and architecture) are actually present and their import settings are correct (see Unity/Libraries Setup Reference Table).
Plugins colliding with each other
=> Make sure the native libraries' import settings are correct (refer to Unity/Libraries Setup Reference Table).
Error log "[PKFX] Invalid FX Path"
This can occur when trying to drag'n'drop an effect to the FX slot on a PKFxFX component.
=> Make sure your effects are somewhere under "Assets/StreamingAssets/PackFx" (case sensitive).
=> Make sure the file you are dropping has a "pkfx" extension.
Things broke after an update (Unity5)
This includes :
- effects not playing
- attributes not loading
- Unity crashing on play
- probably more
Since Unity 5, files imported from a package no longer systematically overwrite preexisting files.
This causes our native dlls to be suffixed and duplicated, effectively upgrading the C# assemblies but not the native libraries.
Here is a Safe Way to Upgrade the PopcornFX Plugin in Unity5:
- Create a new "Empty Project" Unity5 project
- Import the new PopcornFX Package (Assets > Import Package > Custom Package...)
- Close all your Unity Projects
- ! Remove all the .meta files from the "Empty Project" !
- Copy paste the Asset files from the "Empty Project" into your "MyProject"
- Open your "MyProject"
- Check on your PKFxRenderingPlugin component if the versions are correct
- You can also check in your Assets/Plugins directory that you don't have any duplicates, if you do, rename the ones suffixed to the original and overwrite
There is a Unity forums thread you can chime in (http://forum.unity3d.com/threads/unity5-and-custom-packages-imports.311807/) and a Unity feedback thread for which you can vote (http://feedback.unity3d.com/suggestions/ask-the-user-for-package-imports-behaviour-keep-both-or-overwrite) for this issue to be resolved.
Update 09/2015 : This should no longer be an issue with the upcoming unity 5.3
Colliding Plugins Error when Building
"Plugin 'HH-UnityPlugin.dll' is used from several locations:"
=> Make sure the libraries referenced in the Libraries Setup Reference Table (Unity Plugin) have the appropriate platform import settings.
Effects don't look the same as in the PopcornFX editor
The PopcornFX editor has several post-effects enabled by default, including gamma-correction and a bloom.
You'll need to switch your rendering to linear and add a bloom to your camera to replicate the default PopcornFX rendering in Unity.
See also : Particle Editor Top-Toolbar (12 : Post-FX)
Make sure you select "OpenGL 2" in the graphics API list from the player settings.
The PopcornFX plugin doesn't support OpenGL Core, yet.
See also Supported Graphics APIs Reference Table
Error Building Player (Unity 4.X)
Error building Player: IOException: Cannot create Temp/StagingArea/UnityPlayer.app/Contents/Plugins/HH-UnityPlugin.bundle/HH-UnityPlugin.bundle because a file with the same name already exists.
This is a bug in Unity's building process, to work around it you need to :
- Move HH-UnityPlugin.bundle from Assets/Plugins to a place of your convenience.
- Build your app.
- Right-click on the built app and select "Show Package Contents".
- Create a "Plugins" directory in "Contents" if it doesn't already exist.
- Copy HH-UnityPlugin.bundle in Contents/Plugins
- Run your app to see PopcornFX loading fine.
The Y Axis Is Flipped
This can occur in DirectX when the PKFxRenderingPlugin component's HasPostFx boolean is not set appropriately.
=> Make sure to disable it if you disable distortions and you don't have any other post effect left on the camera.
/!\ Some post effects may interfere with this setting. If this doesn't solve the issue, try disabling your post effects one by one to identify the culprit.
Failed to load/DllNotFoundException/EntryPointNotFoundException
=> Make sure the native libraries for your system (and architecture) are actually present in the Assets/Plugins directory (refer to Unity/Libraries Setup Reference Table).
If they are but the problem persists, verify you have the Microsoft Visual C++ 2010 Redistributable Package suitable for your version of the Unity editor.
=> 32 bits : http://www.microsoft.com/en-us/download/details.aspx?id=5555
=> 64 bits : http://www.microsoft.com/en-us/download/details.aspx?id=14632
If you followed all the steps above but the problem persists, you may be tricked by Unity's cache system...
/!\ if you already created a project and tried to build without following the right steps first, you may have to start a new project from scratch to get your build properly working.
Particle Rendering Bugs After Post-Effects
No rendering/glitched out rendering
There may be errors in the logcat.
=> "DllNotFoundException: HH-UnityPlugin" : Make sure you have imported our Android plugin. Make sure the file Assets/Plugins/Android/libHH-UnityPlugin.so exists in your project.
=> In the player settings, uncheck "Multithreaded Rendering", as it is not supported on Android, yet.
Effects won't load
=> Make sure you followed the Android deployment steps.
Effects don't look the same as on desktop/in the editor
Rendering on Android is done in GLES, which mostly doesn't support gamma-correct blending.
Also, the PopcornFX editor has a glow post-effect enabled by default.
=> Tweak your effect, colors tend to saturate faster on mobile.
=> Add a glow post effect to your camera.
It won't work, spits out OpenGLES errors (Unity >= 4.6)
=> In your player settings, make sure you set the "Graphics API" setting to OpenGLES 2.0.
See also Supported Graphics APIs Reference Table
PNG textures won't load (Universal/arm64 architecture)
=> Unity < 5.1 : In XCode, in the build phases, make sure you move the library named "libPK-Plugin_CodecImagePNG_r.a" all the way up in the "Link Binary With Libraries" section.
=> Unity >= 5.2 : Avoid using png textures, this bug will be fixed in v2.6.
- Shader error in 'Hidden/PKFx Depth Copy': Program 'frag', error X4530: pixel shader must minimally write all four components of SV_Target0 (on d3d11_9x)
=> You can fix this error by editing the shader in question (Assets/PopcornFX/Resources/PkFxDepthCopy), at line 46, replace
#if !defined(SHADER_API_D3D9) && !defined(SHADER_API_D3D11_9X)
- VelocityCapsuleAligned billboarders produce visual glitches on some Android devices.
- In GLES (Android/iOS), particles won't show up if there's no skybox.
PNG textures fail to load on iOS from v5.1 of Unity.Fixed in 2.6