Jump to content

Possible to create objects that are not parts?


Recommended Posts

Hey, I'm thinking about getting into modding KSP with some plugins. I already have a lot of experience using Unity. I had one in mind, which would basically have interactable items in the world. However, from researching, I couldn't find any way to add objects that aren't parts or vessels. Basically, is it possible to access normal Unity stuff like Unity's Instantiate function? Thanks

Link to comment
Share on other sites

16 minutes ago, xEvilReeperx said:

Yes, it's no problem

Alright, thanks. How would I then load models from code? In Unity, I would use the Resources folder to load models at runtime, but I'm not sure if I'm able to do this in a compiled Unity game? If so, where would I place it?

Link to comment
Share on other sites

The simplest way is the same way parts are loaded, by using PartTools to export to a .mu file. That'll be loaded by the game into GameDatabase.Instance.databaseModel. Parts are created when an appropriate config refers to the model in this list but you can use it for whatever purpose.

The format does have some limitations though, so if you find you need more capability you can use an AssetBundle instead. In that case, you might find this thread to be a useful read

 

Link to comment
Share on other sites

Just now, xEvilReeperx said:

The simplest way is the same way parts are loaded, by using PartTools to export to a .mu file. That'll be loaded by the game into GameDatabase.Instance.databaseModel. Parts are created when an appropriate config refers to the model in this list but you can use it for whatever purpose.

The format does have some limitations though, so if you find you need more capability you can use an AssetBundle instead. In that case, you might find this thread to be a useful read

 

Perfect, just what I needed. Thanks!

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