• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Creating and Exporting Models from Unity for use in 7D2D

Updating for A21

Here are the links you will need to get started modding A21 using Unity. You must use Unity 2021.3 to create new assets for A21.  

Things you will need to follow along with the videos (note that the video talks about old version of unity but it is the same process).  

Step 1:  Download the Unity Hub and Unity 2021.3.19f1:  https://unity3d.com/get-unity/download/archive

then Install it.

Step 2:  Download my Unity 2021.3 template projecthttps://drive.google.com/file/d/1yPQ2yOj1Oe7pOml3ytfZcNggWWTAD4gq/view?usp=sharing then unpack it, saving it to a location you will remember.  

Step 3:  Open unity Hub, and click the ADD button, locate my project template, and select that folder. 

You now have a properly configured modding platform.  The project includes the TFP tagmanager, Linear lighting configuration, and the export script needed to export your new things as .unity3d bundles.  

Step 4:  Go watch the tutorial videos.

https://www.youtube.com/user/xythq/playlists?shelf_id=0&view=1&sort=dd

Step 5:   Make something cool, and have fun doing it! 

 
Last edited by a moderator:
The export C# script asset: https://github.com/7D2D/Templates-and-Utilities

Right click on the ExportAssetBundles.cs script and then right click and select save link as. Save it to your desktop then open unity and drag the script into your asset folder.

Now onto the videos.

https://www.youtube.com/user/xythq/playlists?shelf_id=0&view=1&sort=dd
So I have to do drag the script into every new project?

Edit:

I opened a new project and dragged the script into my asset folder. I got tons of errors in the bottom window. I dragged the sound file I want to use to change existing sounds in the game to assets. I right clicked on it and did not get the option to Build Asset bundle.

 
Last edited by a moderator:
ANY script error causes unity to not load any scripts. Sounds like you have more than one copy of the builder script in unity.

 
ANY script error causes unity to not load any scripts. Sounds like you have more than one copy of the builder script in unity.
OK I have Xyth's Fun With Flags Tutorial and it has the script in it. That's were I imported and exported the sound file from for my zombie sound changing mod. I was thinking that might be the problem so I wanted start a blank project to work from but I'm having the issues I mentioned above. I'm not looking for hand holding and have been trying to research everything I can on my own, but I haven't got a clue what to do next. Where do I look for this extra copy of the builder script go get rid of it. How do I get that script into my project?

Thank you for your time.

 
The script from the fun with flags video should work. If you start a new project, you need to add the script file into that project. Just go into the fun with flags project, find the script file in the asset folder. Right click on it and select show in explorer. Than in explorer amke a copy and then open your new project and drag the script into that projects asset folder.

 
The script from the fun with flags video should work. If you start a new project, you need to add the script file into that project. Just go into the fun with flags project, find the script file in the asset folder. Right click on it and select show in explorer. Than in explorer amke a copy and then open your new project and drag the script into that projects asset folder.
I got the script out of your 2nd tutorial and it worked. Thanks

 
so if I wanted to design a new forge with hopper for extra resources and using Gas to burn hotter and faster. would I design in Unity?

 
Hello. Help me please. I just can’t understand what’s wrong with me, and how can I add model as a block. When I pick up the unit, the console shows these 6 errors. My English is weak, but it seems like you need to add scripts for the block. How to do it? A model appeared above the character, but nothing can be done.View attachment 28923

https://sun9-43.userapi.com/c858136/v858136885/45237/wM6f8JT6Zh8.jpg

The referenced script (MMDEngine) on this Behaviour is missing!

The referenced script (ExpressionManagerScript) on this Behaviour is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script (MMDEngine) on this Behaviour is missing!

Model transferred from mmd format to Unity

 
Last edited by a moderator:
Hello. Help me please. I just can’t understand what’s wrong with me, and how can I add model as a block. When I pick up the unit, the console shows these 6 errors. My English is weak, but it seems like you need to add scripts for the block. How to do it? A model appeared above the character, but nothing can be done.View attachment 28923
The referenced script (MMDEngine) on this Behaviour is missing!

The referenced script (ExpressionManagerScript) on this Behaviour is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script (MMDEngine) on this Behaviour is missing!

Model transferred from mmd format to Unity
FYI your attachment is coming as invalid. Also have you followed Xyth's tutorial on custom blocks?

Not sure what your "block" is either or what you're trying to do. Blocks don't generally require scripts...

 
Ответ

FYI your attachment is coming as invalid. Also have you followed Xyth's tutorial on custom blocks?
Attachment updated.

I want to add a block. But it seems the script requirement is specified in the Mmm.unity3d file

In the Block.xml file appears:

<block name="Mmm">

<property name="CustomIcon" value="BKing"/>

<property name="Extends" value="Chess BBishop"/>

<property name="Model" value="#@modfolder:Resources/Mmm.unity3d?MmmPrefab" param1="main_mesh"/>

</block>

 
Last edited by a moderator:
Attachment updated.I want to add a block. But it seems the script requirement is specified in the Mmm.unity3d file

In the Block.xml file appears:

<block name="Mmm">

<property name="CustomIcon" value="BKing"/>

<property name="Extends" value="Chess BBishop"/>

<property name="Model" value="#@modfolder:Resources/Mmm.unity3d?MmmPrefab" param1="main_mesh"/>

</block>
This was the link I meant to share:

There is a script you need to import in unity to export blocks, unrelated to mmd. You can find the script here:

https://github.com/7D2D/Templates-and-Utilities/blob/master/ExportAssetBundles.cs

 
Ответ

This was the link I meant to share:
Thank you very much. But the problem was not solved. To make it clear, I will show my actions in order in the screenshots.

https://sun9-45.userapi.com/c858432/v858432177/43fe8/x6Dvkh20JDw.jpg

https://pp.userapi.com/c858432/v858432177/43ff2/OB-yOENSZ1A.jpg

https://sun9-29.userapi.com/c854224/v854224984/c409f/zOH45640K8w.jpg

https://sun9-44.userapi.com/c857416/v857416984/4298f/FT9GzBdoghk.jpg

https://sun9-20.userapi.com/c851236/v851236984/18e45d/I9hzX2TXwiw.jpg

https://sun9-18.userapi.com/c858424/v858424984/44ad7/rBXDfsNnu94.jpg

https://sun9-3.userapi.com/c855036/v855036984/c2dca/kCaP6UOTAzk.jpg

https://pp.userapi.com/c851028/v851028536/18d844/c6MGw7Lhrzg.jpg

https://sun9-37.userapi.com/c854224/v854224536/bf0a4/oOTtKu60xUM.jpg

https://sun9-54.userapi.com/c852032/v852032536/186b37/T5osSLcEDbg.jpg

https://sun9-2.userapi.com/c855732/v855732536/c14fe/FMv0y_PP_Kw.jpg

https://sun9-33.userapi.com/c858024/v858024984/4455c/uE6LDUahpFU.jpg

https://sun9-38.userapi.com/c858024/v858024984/44578/Y_uvDFKhS14.jpg

https://sun9-40.userapi.com/c858024/v858024984/445b8/ofXAlRr1esE.jpg

https://sun9-24.userapi.com/c852120/v852120536/19e062/nxw4LFl5sKg.jpg

https://sun9-43.userapi.com/c858024/v858024984/445d5/ZQkgfq9Mevw.jpg

https://pp.userapi.com/c855420/v855420536/b52b4/kkewFlxbDyk.jpg

https://pp.userapi.com/c852036/v852036536/19bf4f/N1cZnloBCKI.jpg

https://sun9-38.userapi.com/c850728/v850728536/18f261/rAT36scX8P4.jpg

https://pp.userapi.com/c854224/v854224536/bf125/iFNLfaCyLhk.jpg

https://sun9-7.userapi.com/c857628/v857628536/439eb/iuHfiOggKVU.jpg

Foto in my googleDrive for comfortable view, and some files

https://drive.google.com/drive/folders/1UGV41jX1WVQHQO_KiVtNQNa8A-QG3asw?usp=sharing

At the moment, I continue to look for a solution.

I will be glad to any advice.

 
Last edited by a moderator:
Unity scripts (all of them) must be removed from the unity objects prior to exporting to a .unity3d file.

7 Days to Die does NOT support unity scripts. I hope this helps.

 
According to the error there's an issue in your recipes xml. Somewhere you have a block named Soccer Ball that doesn't exist. Remember to be case sensitive. "This" is different that "this" There should also only be a Parent Folder and child folder.

Also what Guppy just said. Forgot about that since I don't use any scripts except the export script.

 
Well I'm only addressing the yellow errors; the red errors indicate that the unity3d file wasn't exported correctly, because the filename and prefab name seem to be correct.

 
Unity scripts (all of them) must be removed from the unity objects prior to exporting to a .unity3d file.
7 Days to Die does NOT support unity scripts. I hope this helps.
How to remove Unity scripts?

 
Back
Top