Jump to content

Part tools texture problem


1.21 GW

Recommended Posts

Hi, I am attempting to make my first mod.

I tried to export my fueltang from in unity and it exports my model but not the texture as seen in the following screenshot.
The error as shown on the buttom left reads: TypeLoadException: Failure has occures while loading a type.
I am copletely new to modding KSP and working with unity. Can anyone help please?
vylUtDr.png

Link to comment
Share on other sites

Hmmm... idk...
Probably not related, but you should probably really be exporting textures to .png or .tga format while working on your mod. Then for a release, convert the textures to .dds.

Also, you shouldnt have ANY components on your top level GameObject, except PartTools. So, basically, you want that Mesh Collider component further down the hierarchy.
Also, for a part like that, you would probably be better off using a Box (cylinder) collider, rather than a Mesh collider.

Link to comment
Share on other sites

1 hour ago, 1.21 GW said:

I tried but the textureformat does have no influence on that it does not get exported.

No it wouldnt. Thats not what i was suggesting. ;)
.tga and .png are much easier to edit/create in most 3rd party editing software. Also, .mbm is more resource/performance intensive.

And, now, looking at your pic again, are you sure you assigned a Material and texture(s) to the gameobject(s)?
You should have the "Show materials" checkbox showing. If you dont assign a material, using the texture(s), Unity wont know to export the textures matching/assigned to the .mu.

If you click it, then click "Compile Materials", you'll get a list of materials/textures similar to this:

n3OHTb0.png

Link to comment
Share on other sites

@1.21 GW,

at first of all my congratulations to the started attempt to create a mod. I have made a few thoughts about the described problem and think I have found some approaches to solve it.

The problem is in the choice of the name of the path component "Dateien für Spiele". First of all it contains spaces and to make things worse it contains a special character which cannot be processed correctly by Unity. Rename the directory and the partfile can probably be created.

More tips:

- Create a mainpath for your mod in the menu "Tools" -> "KSP Part Tools" -> "Setup" -> "Set Data Dir" so you need only the final target path for your Part in the File URL.
- Check on each component where a KSP compatible shader is selected and the texture is assigned.
- Set the Texture Format to PNG
- NEVER use convex on mesh collider, KSP cant work with convex mesh. Best way is to create a separate collider low poly part and load it as mesh collider.

regards

hraban

 

Edited by hraban
Link to comment
Share on other sites

19 hours ago, Stone Blue said:

No it wouldnt. Thats not what i was suggesting. ;)
.tga and .png are much easier to edit/create in most 3rd party editing software. Also, .mbm is more resource/performance intensive.

And, now, looking at your pic again, are you sure you assigned a Material and texture(s) to the gameobject(s)?
You should have the "Show materials" checkbox showing. If you dont assign a material, using the texture(s), Unity wont know to export the textures matching/assigned to the .mu.

If you click it, then click "Compile Materials", you'll get a list of materials/textures similar to this:

n3OHTb0.png

Boss, when the map format in ksp tool is png, why is the exported file only mu file, no map file, and unity prompt texture:'resource/ unity_builtin_extra' > >'C:. .png.UnityEngine.Debug: log (object) what did I do wrong?

17 hours ago, hraban said:

@1.21 GW,

at first of all my congratulations to the started attempt to create a mod. I have made a few thoughts about the described problem and think I have found some approaches to solve it.

The problem is in the choice of the name of the path component "Dateien für Spiele". First of all it contains spaces and to make things worse it contains a special character which cannot be processed correctly by Unity. Rename the directory and the partfile can probably be created.

More tips:

- Create a mainpath for your mod in the menu "Tools" -> "KSP Part Tools" -> "Setup" -> "Set Data Dir" so you need only the final target path for your Part in the File URL.
- Check on each component where a KSP compatible shader is selected and the texture is assigned.
- Set the Texture Format to PNG
- NEVER use convex on mesh collider, KSP cant work with convex mesh. Best way is to create a separate collider low poly part and load it as mesh collider.

regards

hraban

 

Boss, when the map format in ksp tool is png, why is the exported file only mu file, no map file, and unity prompt texture:'resource/ unity_builtin_extra' > >'C:. .png.UnityEngine.Debug: log (object)Can you give me some suggestions?

Edited by A cute kerman
Link to comment
Share on other sites

55 minutes ago, A cute kerman said:

Boss, when the map format in ksp tool is png, why is the exported file only mu file, no map file, and unity prompt texture:'resource/ unity_builtin_extra' > >'C:. .png.UnityEngine.Debug: log (object) what did I do wrong?

Boss, when the map format in ksp tool is png, why is the exported file only mu file, no map file, and unity prompt texture:'resource/ unity_builtin_extra' > >'C:. .png.UnityEngine.Debug: log (object)Can you give me some suggestions?

The .mu file is the compilation of the Unity model. The 3D model, shader and texture data are written to this file. Among other things also the URL data which, as described, contain invalid characters. (What is allowed under Windows may not be used at every place).
If the basic settings would fit, the textures would be written into the URL directory in the specified format.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...