Page 1 of 1

Save material (PlayMaker)

Posted: Mon Mar 02, 2020 8:52 pm
by SergeyRussia
Hello.
When you try to save the material of the object, a message appears:
Save : FSM : Save : SaveMaterial : Texture 'normal' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

I go into the material properties and enable the box: Read / Write Enable

The error changes to:
Unsupported texture format - Texture2D::EncodeTo functions do not support compressed texture formats.
UnityEngine.ImageConversion:EncodeToPNG(Texture2D)

I convert the elements of the material from .jpg to .png - The error is the same.

Please tell me how to be?

Re: Save material (PlayMaker)

Posted: Mon Mar 02, 2020 9:16 pm
by Joel
Hi there,

You need to use an uncompressed format in the import settings such as RGBA32 or ARGB32.

All the best,
Joel

Re: Save material (PlayMaker)

Posted: Tue Mar 03, 2020 5:31 pm
by SergeyRussia
unfortunately then the images are magnified 8 times (((

I need to somehow save the material that the object uses, so that when loading it is again the material of this object.
I have a large number of textures, an increase in the project by 8 times is too much.
Maybe there is a solution? Something like save a path to materials?

Saving is going well, but for some reason on mobile devices it does not see saves, although in the project settings I specified SD cards.
Maybe I'm doing something wrong, because I see that your plugin is wonderful.

Thanks for the good support!

Re: Save material (PlayMaker)

Posted: Tue Mar 03, 2020 5:41 pm
by Joel
Hi there,

An alternative might be to put all of your Materials into an array, and then save the index of the Material in the array. Or if each Material will have a unique name, save the name of the Material and use this to lookup the Material from the list.

We've had no reports of it not working on mobile. Would you be able to check that there are no error messages output to the log?

All the best,
Joel

Re: Save material (PlayMaker)

Posted: Thu Mar 05, 2020 7:34 pm
by SergeyRussia
Thanks!
Finding an array of materials by name is a great solution!
It works!