Ludeon Forums

RimWorld => Mods => Help => Topic started by: demeggy on October 29, 2016, 07:10:46 PM

Title: 'could not load unityengine.texture2d'
Post by: demeggy on October 29, 2016, 07:10:46 PM
Evening all.

A fairly standard, common issue here, that has left me scratching my head tonight.

Trying to get some new apparel ingame. The filepath I'm using in the def is spot on, the file itself is a .png based off an existing ingame asset - yet every time I load RW up, I receive the 'could not load unityengine.texture2d at etc' error.

Any suggestions?

Demeggy
Title: Re: 'could not load unityengine.texture2d'
Post by: kaptain_kavern on October 29, 2016, 08:02:47 PM
I struggle with those at first, before I get to know more how the <graphicClass> setting influence the way you should specify the path.

With <graphicClass> set to Graphic_Single the path should point to the file itself, when using other like Graphic_Multi, Graphic_Random or Graphic_StackCount you should refer to the folder containing the texture files.

I'm not 100% if this is your exact problem, though, but maybe this could help


Nice progression on your mod BTW, keep up !  ;)
Title: Re: 'could not load unityengine.texture2d'
Post by: Dingo on October 29, 2016, 08:31:22 PM
Make sure your path doesn't include the file extension at the end of it.
Title: Re: 'could not load unityengine.texture2d'
Post by: demeggy on October 30, 2016, 06:58:13 AM
Quote from: kaptain_kavern on October 29, 2016, 08:02:47 PM
I struggle with those at first, before I get to know more how the <graphicClass> setting influence the way you should specify the path.

With <graphicClass> set to Graphic_Single the path should point to the file itself, when using other like Graphic_Multi, Graphic_Random or Graphic_StackCount you should refer to the folder containing the texture files.

I'm not 100% if this is your exact problem, though, but maybe this could help


Nice progression on your mod BTW, keep up !  ;)

Cheers both. Ill double check. Ive got a _front,  _side and _back variant for the headgear and helmet - and it points only to the first part of the filename

(E.g. Things/Pawns/Apparel/tuskencloak)

With the def being a graphic_single

Edit: see below

<graphicData>
      <texPath>Things/Pawn/Humanlike/Apparel/Tuskenmask</texPath>
      <graphicClass>Graphic_Single</graphicClass>
</graphicData>


And the filepath:

(http://i.imgur.com/0lexruA.png)
Title: Re: 'could not load unityengine.texture2d'
Post by: demeggy on October 30, 2016, 07:57:04 AM
FIXED: I'm an idiot...

I had a front, back and side texture, but no unworn texture. Rectified by creating a copy of the tuskenmask and tuskencloak front textures, and removing the _front suffixes. Voila!

Thanks for the help guys.
Title: Re: 'could not load unityengine.texture2d'
Post by: koni on October 30, 2016, 02:29:18 PM
Hey guys,
I have also such a problem...
the pathes should be the right one ad the grahpic do exist, but thay won't load (same error). It effects the worn and the unworn path.

Thanks
Title: Re: 'could not load unityengine.texture2d'
Post by: demeggy on October 30, 2016, 07:44:20 PM
Quote from: koni on October 30, 2016, 02:29:18 PM
Hey guys,
I have also such a problem...
the pathes should be the right one ad the grahpic do exist, but thay won't load (same error). It effects the worn and the unworn path.

Thanks

Ensure you have the following:

- texturename_front, texturename_side, texturename_back and texturename textures

If graphic_multi, point to the folder the textures are stored in
If graphic_single, point to the 'texturename' part of your filename (i.e. don't include the _side or file extension)

File type, I'm assuming only .png or .tex are acceptable types - someone can advise better on this.
Title: Re: 'could not load unityengine.texture2d'
Post by: swaggeringcuban on June 24, 2019, 01:20:41 PM
getting a lot of
'could not load unityengine.texture2d'
errors with glitterworld, is it still working with latest game version?
Title: Re: 'could not load unityengine.texture2d'
Post by: Canute on June 24, 2019, 01:58:06 PM
Glitterworld got a 1.0 version and pretty popular (but unbalanced).
So it should work or more reported would popup.
The latest versions didn't change anything at the texture syntax.