Jump to content

[solved] unity not exporting texture


Recommended Posts

I have started to use unity to export my KSP object into KSP but no mater what I have done unity will not export my texture. I have deleted every thing out of the project and reimported it. I have also made a new project. The error cosal does not say any thing is wrong. Does any one now how to fix this.

Thanks O.R.C

Edited by O.R.C
solved
Link to comment
Share on other sites

Rather than jumping around, lets keep all of your questions related to this part and importing/exporting and setting it up in this thread, ok?

to help you, we need a screenshot of your Unity window with the Part tools config exposed, something like this:

Ii5OROU.png

You can hit printscreen to capture an image and then paste it into whatever image editing software you have, save it and upload it to Imgur.com and then link it here.

Link to comment
Share on other sites

The forum link button is broken currently. you can enter it manually using IMG tags.

If you used Imgur.com, on the page where you got the link there is one labeled "BBCode" that has the IMG tags already around it. You can just copy/paste that into a post

Link to comment
Share on other sites

Okay, in the hierarchy, delete the Main Camera (you dont want to export that)

then drag your electric engine object and release it over the 'tools' object. Your object with part tools should be the "top" of your object tree, with all models and such below it.

Try it again that way and see if it works

Link to comment
Share on other sites

Thank you that works and now I can see it in KSP. Only problem is, on the launch pad the object falls through the ground and the purple light turns on. What should I do. The object has no thrust even though I made a empty for the thrust to come from.

Edited by O.R.C
Link to comment
Share on other sites

If its falling through the ground it sounds like you may not have a collider on your part. Highlight your mesh in unity, then go to Components, Physics, Mesh Collider. Then on the right side find the "convex" box and check that.

Would need another screenshot of your unity setup to see how you have the thrustTransform configured.

You have went through the various posts about engines linked in this thread, correct? http://forum.kerbalspaceprogram.com/showthread.php/25013-Compilation-of-modding-information-links-for-0-19-20-21-Last-updated-10th-September

Link to comment
Share on other sites

I've been getting a weird error. Unity will export my textures sometimes but not others. I've tried reloading the prefab, deleting and re-adding PartTools (.20), messing with the textures, messing with the models and all that. Only thing that works is to create a new game object and move everything over to that.

It's getting really irritating. Literally will work one minute, and then won't the next.

File error:

at (wrapper managed-to-native) UnityEngine.Mesh:get_vertexCount ()

at KSPPartTools.PartWriter.WriteMesh (System.IO.BinaryWriter bw, UnityEngine.Mesh mesh) [0x00000] in <filename unknown>:0

at KSPPartTools.PartWriter.WriteCollider (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0

at KSPPartTools.PartWriter.WriteChild (System.IO.BinaryWriter bw, UnityEngine.Transform t) [0x00000] in <filename unknown>:0

at KSPPartTools.PartWriter.Write (System.String modelName, System.String filePath, UnityEngine.Transform target, TextureFormat textureFormat) [0x00000] in <filename unknown>:0

UnityEngine.Debug:LogError(Object)

KSPPartTools.PartWriter:Write(String, String, Transform, TextureFormat)

KSPPartTools.PartToolsInspector:DrawWriterGUI()

KSPPartTools.PartToolsInspector:OnInspectorGUI()

PartToolsEditor:OnInspectorGUI() (at Assets/PartTools/Editor/PartToolsEditor.cs:18)

UnityEditor.DockArea:OnGUI()

Link to comment
Share on other sites

  • 2 weeks later...

Alskari, I was having the same thing happen to me on the weekend. Were you replacing the imagemaps? I think my problem may have been when I tried to reimport the images into unity. That function doesn't seem to work and since I wanted to use the same image name I deleted the old copy of it before importing it again as a new asset. I think this might have broken the material. I'm new to unity and don't really know what I'm doing yet so I may have had a bunch of unneeded components or been adding the images wrong. I used to just drag them into the viewport and it seemed to work till I wanted to change the image.

What I've started doing is to import the new texture as a new asset, select the material from the asset window, and then assign the new image in the inspector window. At this point it seems to be safe to delete the old image. The only thing in my hierarchy is the object. The only components in the object are transform and animate that are created for all objects, the mesh renderer, the mesh collider, and the KSP parttools. Not sure if I really need the mesh renderer since it seems to display fine in unity without it.

Since I started using just this stuff in Unity I haven't run into a problem when I edit the textures. Could be just luck if it's a Unity bug or perhaps I was doing something wrong before.

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...