• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unity crashes after changing SubstanceGraph textures resolution from a script.

New Here ,
Jul 05, 2021 Jul 05, 2021

Copy link to clipboard

Copied

Unity Version: 2020.3.11f1

Plugin Version:2.6.0

 

substanceGraph.SetTexturesResolution(new Vector2Int(512, 512));

substanceGraph.QueueForRender();
substanceGraph.RenderSync();

 

throws:

 

NullReferenceException: Object reference not set to an instance of an object
at Substance.Game.NativeCallbacks.csGameTextureCallback (System.String assetPath, System.IntPtr preComputeCallback, System.UInt32 outputHash, System.Int32 pSubstanceFormat, System.Int32 channelsOrder, System.Int32 width, System.Int32 height, System.Int32 mipCount, System.IntPtr sPixels) [0x001a1] in <8088e596cdc64f389f7f79f32b7b19f0>:0
at (wrapper managed-to-native) System.Object.wrapper_native_00007FFF4CC95360()
at Substance.Platform.NativeFunctions.cppProcessQueuedOutputs () [0x00039] in C:\..\Assets\Allegorithmic\Plugins\Substance.Platform\NativeFunctions.cs:864
at Substance.Game.NativeCallbacks+Renderer.ProcessJobs () [0x00012] in <8088e596cdc64f389f7f79f32b7b19f0>:0
at Substance.Editor.SubstanceMain.Update () [0x00119] in <c02c644420904d8cb7f0dbe27269d0c2>:0
at (wrapper delegate-invoke) <Module>.invoke_void()
at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () [0x00076] in <0b8db76a688c4d18a15dd7dfe092a035>:0

TOPICS
Bugs & Crashes , Unity

Views

363

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jul 21, 2021 Jul 21, 2021

Copy link to clipboard

Copied

@Woof15A8 Apologies, it looks like we missed your post! I don't have an answer at this moment but will follow up with you as soon as the team reviews it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 24, 2021 Sep 24, 2021

Copy link to clipboard

Copied

We're having the same issue and callstack on Unity 2021.1.4f1 with Substance 2.6.0.

This did not happen on Substance 2.5.3 (haven't tested 2.5.4 yet), so we have to stay on that version until this is fixed.

The crash does not happen in 2.6.0 if we take out the SetTexturesResolution call.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2021 Oct 09, 2021

Copy link to clipboard

Copied

LATEST

Hey guys i am having a similar problem on unity 2020.3.17f1 every time i try and use sbsar files but i am dragging and dropping though, is there other precautions i should be taking?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation
Download Latest Versions