Page 4 of 12

Re: Modding Tutorials

Posted: Wed Jul 19, 2017 10:47 pm
by AlexanderSig
I'm having a tiny issue when compiling a single model replacement as a mod. When I load the game the terrain loads fine but no buildings or any other models at all appear similar to what Uncanny_Valley was getting. I am very new to Unity so any help would be greatly appreciated.

Here's what I'm doing: Image

Re: Modding Tutorials

Posted: Wed Jul 19, 2017 11:14 pm
by TheLacus
Welcome to the forums :)

The first step is to look for an exception in the log file, probably a null reference.

Note that if you compile as a debug build you get errors printed on screen, also for issues with materials etc. so it makes testing easier. Additionally when running a debug build you can import models directly from the assets folder in the editor so we limit the things that can go wrong.

I can't see anything strange with your screenshot but if I have to take a wild guess i believe there might be something wrong with the gameobject hierarchy. Can you expand the prefab and make a screen?

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 3:48 pm
by TheLacus
I'm talking about this:
GameObject.png
GameObject.png (12.9 KiB) Viewed 4561 times
If your model is inside an empty prefab like in this example, drag it out ;)

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 5:28 pm
by AlexanderSig
Here's the hierarchy Image

In the meantime I've gotten other models to work Image

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 8:54 pm
by TheLacus
What you can do even now is to set a component, Plane for example, as the parent and all the Plane.xxx as their children.
I've just made a PR which allows an empty prefab to be the parent, so this will be a possibility, too. Just pay attention to the origin.

Good work with the chair :)

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 9:13 pm
by AlexanderSig
TheLacus wrote:What you can do even now is to set a component, Plane for example, as the parent and all the Plane.xxx as their children.
I've just made a PR which allows an empty prefab to be the parent, so this will be a possibility, too. Just pay attention to the origin.

Good work with the chair :)
Great, thanks!

One final question... :)

I've been importing a bunch of models today and they show up fine in the scene window but in-game they all have weird rotations on them. They're set-up exactly like the original models in blender and I export them as Y up and -Z forward.

In-game: http://i.imgur.com/z8FHbap.png
Blender: http://i.imgur.com/QvaIKNb.png
Scene window: http://i.imgur.com/tTUm2aW.png - I think it's tied to this rotation quantity that's greyed out. I've tried setting the rotation to 0 on the mesh and making a new prefab like that but it always goes back to -90. I've also tried rotating the model in Blender and exporting it again but somehow that doesn't work...

That one chair model also has a much smaller scale than every other model even though I set the scale to 0.025 just like with all of my other models...

I had never used Unity before last night so sorry for all the questions. I'd really like to get these models released soon

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 9:40 pm
by TheLacus
AlexanderSig wrote: I've been importing a bunch of models today and they show up fine in the scene window but in-game they all have weird rotations on them. They're set-up exactly like the original models in blender and I export them as Y up and -Z forward.
I can import them correctly doing this:
  1. Rotate on x of -90
  2. Ctrl-A and apply rotation
  3. In the transform tab of blender set roation x: +90
You may need to do the same on z: -180.
I suggest you to try this plugin which does it automatically; apply full rotation fix and just export it as usual.
AlexanderSig wrote: That one chair model also has a much smaller scale than every other model even though I set the scale to 0.025 just like with all of my other models...
41100 and 41101 have the same size here, which model is the little chair?

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 11:02 pm
by AlexanderSig
Awesome! It works now, thank you very much!

Here's a comparison

Image
Image

I've finished about half of the tables, chairs and benches in this style already and I'm going to finish them all soon. The scale of the chairs is still a little small but I can fix that.

Re: Modding Tutorials

Posted: Thu Jul 20, 2017 11:18 pm
by Interkarma
That's looking great!

Re: Modding Tutorials

Posted: Fri Jul 21, 2017 1:11 pm
by TheLacus
Awesome, can't wait to play with this!