Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by david 2 · Apr 21, 2011 at 09:52 PM · javascriptminecraftbatchmode

mods to unity kinda?

hi im making a minecraft clone! i know that java is easy to mod but i never seen unity so im looking to integrate mods to my game and i thinked ill make a folder in my Game_Data folder called mods and modders will write the javascript in text files in the folder so can someone give me a hand? oh and if you say like (an example (not gonna work)) PlayerPrefs so you will link the source/ tutorial/wiki page/etc. EDIT: To all who didn't understand, I CREATE A MINECRAFT STYLE GAME IN UNITYSCRIPT NOT A MINECRAFT MOD!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AngryOldMan · Apr 21, 2011 at 10:12 PM 0
Share

Is there a $$anonymous$$ecraft come-back I don't know about? Quite a few people are using unity to make $$anonymous$$ecraft style games. That aside what is the question?

avatar image Chris D · Apr 21, 2011 at 10:25 PM 0
Share

$$anonymous$$ake sure you don't confuse Java with Javascript - they're very different things. Are you trying to just mod $$anonymous$$inecraft itself or are you going to build it from scratch?

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Peter G · Apr 21, 2011 at 10:19 PM

It will be difficult to include mods in Unity. Unity won't compile code that your users add into a folder so it isn't as simple as just letting them place scripts in a folder.

You can load assemblies into Unity using Reflection. I don't have an example, but I don't know why you couldn't do it.

http://msdn.microsoft.com/en-us/library/system.reflection.assembly.aspx

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by justlost · Feb 15, 2012 at 07:03 AM

Adding to what Peter G said, the only way you are going to be able to allow mods is if you load dlls dynamically from your game.

I've gotten this to work on unity indie and there is no reason it wouldn't work on pro.

Tho, you have to do some preparation. You'll need an assembly(a dll) that both the mod and your game share. This assembly should expose either Interfaces or Classes that the mods can inherit/extend. Be careful tho, only expose interfaces/classes you want the mods to use. Also, changing that shared dll in any way after your game is ship would probably break mods unless you take some precautions.

One more caveat to this method is that once you load the dll, it can not be unloaded while the game is running, so you have to take that in consideration.

The other potential big issue is that you will probably only be able to take dlls made from visual studio/mono as I haven't seen the unity editor compile libraries. But that comes with the plus... just about any language that can compile to a .net(2.0 or 2.5) dll you can load as a mod.

Also, your modders will have to compile their mod libs to target .net 2.0 or 2.5 as that' s what unity is running on.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image coolthemanp6p · Mar 01, 2012 at 12:23 AM 0
Share

Do you know any tuts that show this?

avatar image
0

Answer by burgunfaust · Apr 21, 2011 at 10:24 PM

You could also load plain text files rather than java in text form. Those text files can be loaded at runtime, and therefore allow you mod a game.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Pause Menu Background 1 Answer

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Help with placing and destroying blocks 1 Answer

Help with a Cubeland-type script. 1 Answer

How to make a Cube with a texture in a JavaScript? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges