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

Unity Substance Plugin freezes when changing parameters on runtime (Android)

New Here ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

Hello 🙂
 
I am currently working on a android game trying to change substances in runtime.

The substance is referenced by a script when I build the game (Caching Behavior paragraph) (https://substance3d.adobe.com/documentation/integrations/publishing-for-mobile-172823474.html).
 
When I use the "Simulator" of Unity to test the game everything works fine - the textures are generated.

Building works fine without any Errors, but when I start the game on android (Huawei P40 Pro) then it freezes.
 
1.) Do I have to put the .sbsar files in a specific folder so that they work runtime?
2.) Does anyone have the same problem?
3.) Is this a known issue and will it get fixed?
 
Thank you for taking your time to read this message, I am looking forward to a reply :)!
 
 
Unity Version 2021.1.15f1
 
Substance PluginVersion :

Plugin Info:
Release Version: 2.6.0b
Importer Version: 29

Build Info:
Substance Engine Version: 65545.7.2.9 639766099
Build Number: 118
Commit Hash: 2b1f4be3a8d28
Plugin Commit: bb5b08a59db3d1ee3e4da1f31e6bcfdfc0cde11e
Plugin Build: 53

 
 
CODE: 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Substance.Game;
public class SubstanceGeneratorTest : MonoBehaviour
{
    public Substance.Game.SubstanceGraph substanceGraph;



    // Update is called once per frame
    void Update()
    {
        if(Input.touchCount >= 1)
        {
            if(substanceGraph != null)
            {
                substanceGraph.SetInputFloat("Color",Random.Range(0f,1f));

 

                // queue the substance to render
                substanceGraph.QueueForRender();
                

 

                //render all substances async
                 //substanceGraph.RenderAsync(); // both methods dont work. this and the one in the next line.
                Substance.Game.Substance.RenderSubstancesAsync(); 
            }
        }
    }
}
TOPICS
Bugs & Crashes , Unity

Views

272

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
Adobe Employee ,
Aug 23, 2021 Aug 23, 2021

Copy link to clipboard

Copied

Hey @MalteDe

Do you have this problem with this .sbsar only? 

Did you try any Substance materials from Substance Source to see if they work?

Does this work on your Mac or Windows machine and only freezes on Android?

What happens if you remove Substance plugin and build your application without Substance? Does it run on your Android device without any problems?

What version of Unity are you using? 

 

To answer your question regarding location of the .sbsar file, you can drag and drop your .sbsar file on Assets folder. 

 

Thanks,

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 ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Hey @Alireza5EAF  🙂
Thank you for your fast answer!

My Unity version is 2021.1.15f1

It doesnt work with other .sbsar files after building it for Android.

 

I ran it on my windows computer, and it worked on it. it worked aswell in the "Simulator" mode on various simulated devices, and only freezes on my Android device.

 

I tested this one from substance source aswell (https://substance3d.adobe.com/assets/allassets/e9adbcd1c283253a54c01a61a3fa5216a5d3e4db) That one even gave me a "Microsoft Visual c++ Runtime Library Runtime Error!" in the editor in Play mode (Windows) after changing the randomseed value which crashed unity (reproduceable). And it doesnt work for my Android device.

 

After removing any code related to the plugin it worked just fine on Windows and Android and after removing the Plugin everything worked fine aswell.

 

I really hope that this gets fixed, because I really love the way the plugin is designed and am very grateful that you guys developed it, but unfortunetly I cant use it in the current form.

 

Thanks alot!

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 ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

The SubstanceGraph.RenderSync() command doesnt work for me aswell (on Android).

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
Adobe Employee ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

Hi @MalteDe 

Thanks for gettng back to me with more information about this problem.

I have created a JIRA ticket for this problem and as soon as I hear from our developement team I will update you.

Thanks,

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 ,
Aug 26, 2021 Aug 26, 2021

Copy link to clipboard

Copied

LATEST

Hi @Alireza5EAF,

Thank you for creating a JIRA ticket I am looking forward to hear from you. 

Thanks alot

 

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