Skip to main content
Community Manager
March 10, 2022

Newly revamped Substance 3D plugin for Unity

  • March 10, 2022
  • 25 replies
  • 15154 views

Hi everyone!

We are excited to announce that we've released a soft launch of the newly revamped Substance 3D plugin for Unity. The plugin lets users load, apply, and tweak Substance 3D parametric materials directly in Unity.

If you're interested in testing out the plugin, you can download it directly from the Unity asset store: Substance 3D in Unity.

Stay tuned for the official release.

If you have questions or comments, please reach out to us here. Thanks!

    25 replies

    Participant
    October 6, 2023

    It says on update 3.9.0: "Fixed an issue where the Unity plugin was not functional on Android."
    But the update is still not functional on Android for me.
    I get this error still. (Which is the exact same error I got before Android was "Fixed".)

    Error:

    AndroidPlayer "samsung_SM-N960U" A scripted object (probably Adobe.Substance.SubstanceGraphSO?) has a different serialization layout when loading. (Read 1552 bytes but expected 7628 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?"

     

    I've tried various things like disabling libsubstance_linker.so.9 plugin because it complained about that when building for Android, as well as other similar plugins. No luck. Still busted no matter what I do. No documentation saying any other special steps are required to make it work on Android.

     

    Participant
    September 19, 2023

    hello and welcome back to unity 
    This is David from Amplify Shader Editor support and i like to ask if you wish to regain support for your asset 
    please recah out to me when your ready. 

    cheers 
    David amplify support 


    Community Manager
    October 3, 2023

    Hi David,

    What do you mean by "regaining support"? Some of our team members are no longer with Adobe, so it would be helpful to get some context here.

    Participating Frequently
    March 2, 2023

    The plugin is completely unusable in the 2021.3 and 2022.2 editor as of version 3.5.0. Every time you close the project after importing the plugin all of your substances will be broken and not display any of their graphs the next time you open the project again.

     

    Unexpected recursive transfer of scripted class. 'Adobe.SubstanceEditor.Importer.SubstanceImporter' is being transferred while trying to transfer 'graph_0'
    
    SubstanceException: The operation failed to complete
    Adobe.Substance.SubstanceNativeGraph.ApplyPreset (System.String presetXML) (at Assets/Adobe/Substance3DForUnity/Runtime/Scripts/SubstanceNativeGraph.cs:145)
    Adobe.SubstanceEditor.SubstanceEditorEngine.SetStateFromSerializedData (Adobe.Substance.SubstanceGraphSO substanceInstance, System.String data) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:419)
    Adobe.SubstanceEditor.EditorTools.UpdateSubstanceInstance (Adobe.Substance.SubstanceGraphSO instanceAsset, Adobe.Substance.SubstanceFileRawData newFileData) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Utilities/EditorTools.cs:44)
    Adobe.SubstanceEditor.Importer.SubstanceImporter.UpdateSubstanceFile (UnityEditor.AssetImporters.AssetImportContext ctx) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporter.cs:215)
    Adobe.SubstanceEditor.Importer.SubstanceImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporter.cs:164)
    UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <7fef092428a04dc89d2aa6ad3ce5d856>:0)
    

     

     

    Community Manager
    March 2, 2023

    Hi, What platform are you using and could you share the SBSAR file that you are using? 


    Participating Frequently
    February 6, 2023

     

    Material previews in the graph editor are busted in the latest release when Probe Volumes are enabled.

    Adobe Employee
    February 7, 2023

    Hi @ebaender , thanks for reporting this. I can reproduce the blank material preview in the inspector after enabling Probe Volumes in the HDRP Global Settings. We'll track this as a new bug. Since Probe Volumes are an experimental settings things may brake as it develops, but we will be keeping an eye on this.

    Community Manager
    December 15, 2023

    @ebaender: I just wanted to check if you're still encountering this issue.

    Participating Frequently
    December 13, 2022

    Are you going to support terrain material generation? Right now it's pretty much impossible to use substances with terrain.

     

    The main problem is that Unity expects the height data to be in the blue channel of the mask file instead of a separate file. Manually copying the height data to the blue channel of the mask for each output material is a complete pain and not even worth considering if you're working with more than a few of them.

     

    Ideally changing the shader to the HDRP/URP terrain shader in the substance graph would generate this output configuration, but if you do that currently there simply is no output at all.

    Community Manager
    January 17, 2023

    Hi,

    We are currently not planning to add support for terrain material generation. Could you provide more information about your use case and how critical this feature is for it? 

    Thanks!

    Participating Frequently
    December 7, 2022

    I'm starting to see a nasty issue with the plugin using 2021.3.15f1. I'm noticing that there are certain .sbsar materials that outright cause the entire editor to crash with no error report or messages. I can't find any rhyme or reason, and the materials that I'm importing have worked in the past, and can be opened in substnace designer and player without issue. I've tried updating the source .sbs files and re-exporting with the latest substance version, but that doesn't seem to make a difference.

    Participating Frequently
    December 7, 2022

    To follow up with some findings;

    - I've isolated one material in particular that is troublesome, and attempted to load it into the editor. The first attempt outright crashes the editor after attempting to import. It's able to half-create the plugin files before the editor dies. If I let those files remain and attempt to reopen the editor, I can open the editor this time, but I get this error when I click on the substance, and I the inspector screen is empty:

    NullReferenceException: Object reference not set to an instance of an object
    Adobe.SubstanceEditor.SubstanceEditorEngine.InitializeInstance (Adobe.Substance.SubstanceGraphSO substanceInstance, System.String instancePath) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:343)
    Adobe.SubstanceEditor.SubstanceGraphSOEditor.OnEnable () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceGraphSOEditor.cs:85)
    UnityEditor.Editor:CreateEditor(Object)
    Adobe.SubstanceEditor.Importer.SubstanceImporterEditor:DrawSelectedInstanceProperties(SubstanceGraphSO) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporterEditor.cs:324)
    Adobe.SubstanceEditor.Importer.SubstanceImporterEditor:DrawMainUI() (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporterEditor.cs:151)
    Adobe.SubstanceEditor.Importer.SubstanceImporterEditor:OnInspectorGUI() (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporterEditor.cs:127)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

    - I attempted to walk back the editor to 2021.3.6f1 (Mid-july 2022), and this exact issue persists. Given that I'm using unchanged substances and the editor that was previously working, the only variable here is the latest subtance 3.4.0 version.

    - Comparing the problematic material with one that works, there is no palpable difference between them. They all use the same input types (int2, int, float, bool). The problematic one even has fewer inputs than another that works fine.

    - Opening up the Unity Editor.log doesn't even show a palpable error. When the editor crashes and I have full editor logs turned on, it looks like the crash happens halfway through importing the problematic material:

    Registering precompiled user dll's ...
    Registered in 0.001453 seconds.
    Start importing ProjectSettings/ProjectSettings.asset using Guid(00000000000000004000000000000000) Importer(-1,00000000000000000000000000000000)  -> (artifact id: '38a39000ec82f1f2a41f747cc34ec812') in 0.001933 seconds 
    Start importing Assets/LayeredIcyCliff_graph_0 using Guid(26c851950bfb74e5590d960cc6fb26bc) Importer(-1,00000000000000000000000000000000)

     

    Participating Frequently
    October 25, 2022

    Hi There, 

    Thanks for the updates. I'm using the former plugin version 2.6.0 from which I have tens off configured substances and materials. How should I migrate to the 3.3.0 version that you released ?
    When I tried, it updated all the *.sbsar.meta files but lost all the configured materials. I did a rollback so no work lost. 

    This is quite an urgent matter though.

    Participating Frequently
    October 25, 2022

    I mean, is this production ready, or should we stick with the former version meanwhile this new one is stabilising ?

    Participating Frequently
    October 25, 2022

    I feel your pain!!  I'm forced to have to use this version of the plug-in because the company I work for made the switch to a new version of Unity that can only use the newer version.  🙁. So IMO I would absolutely hold off if you can...

     

    It doesn't seem like anyone monitors this forum either...  I have yet to get a reply or anything based on my previous post.  However there is a Discord Substance channel that more people monitor and the community is really helpful there.  I have a pretty in-depth thread on there discribing some of the other issues I've found with this unfinished plug-in if you care to investigate further.  I don't have the link with me at the moment but if you can't find it I'll post it when I get into work today.  

    Good luck!!

    Participating Frequently
    October 18, 2022

    Old vs. New
    In the old plugin I was able to update my SD sbsar with added or removed parameters and then reimport them into Unity and all the graphs associated with that SBSAR would update with those changes.

    In the new plugin those added or removed parameters ONLY update IF I create a new graph from the SBSAR; and the changes are ONLY on the newly created graph.  Previously created graphs DO NOT update with the changes.

    We just switched over to Unity 2021 and urgently need this plugin updating correctly.  

     

    Thanks,
    -Don

    Inspiring
    October 25, 2022

    Hi, Thanks for reporting this issue. This seems to be a bug in the Unity plugin. We'll investigate this further and reach out to you if we need more information. 

    Participating Frequently
    October 25, 2022

    Thank you all for your attention to this matter!!  

    Participant
    October 6, 2022

    Hi!

    The latest version of the plugin removes the class SubstanceRuntimeMaterial used for modify the material using scripting

    https://substance3d.adobe.com/documentation/integrations/substance-3d-for-unity-scripting-232292391.html

    The documentation has no working sample about how to modify this on scripting. Would be possible to see a example/video about howto change parameters in real time ?  Like change the amount of rust, dirt or whatever? Thanks!

     

    Inspiring
    October 10, 2022

    Hi, Thanks for your feedback. We are currently looking into updating the documentation and adding an example to explain how the component works. We appreciate your patience.

    Participant
    September 19, 2022

    I want to animate on Unity using $time defined in substance 3d Designer.

    Roughly speaking, something like $time=Time.deltaTime

    Synthoid
    Participant
    September 27, 2022

    The old native integration had this, so the new plugin should probably have this as well. Be warned that adjusting the $time input live would require a new texture render every frame so it would not be very performant. It could be useful for offline rendering with Timeline though.