Git Product home page Git Product logo

spacepuppy-unity-framework's Introduction

spacepuppy-unity-framework

A framework of reusable objects with the Unity game engine version 5.x.

This project is intended to be compiled in Visual Studio and then place the compiled dll's into the project. When compiling you will need to ensure you reference the UnityEngine and UnityEditor dll's for your version of unity. I include a version list in the Resources folder for the version of unity I'm currently using.

#Quick Import

Select the latest stable version from the builds section of the git page. Or if you want the bleeding edge build locate the files in the Builds/OpenSource directory of the repo.

Drag the contents of this into a folder anywhere in your project and it'll work out of the box, I prefer the 'Assets/3rdParty/SpacepuppyUnityFramework' folder. The included meta file configures the scripts execution order automatically. Caution, this meta file's guid is what controls the references to scripts in the library, deleting or modifying it will ruin any script references.

Once added make sure to go to "Spacepuppy->Settings->Sync TagData".

This will add the required 'MultiTag' and 'Root' tags, as well as sync any of your existing tags to a resource that can be read at runtime. Any time you add new tags you must sync the tag data again by either clicking this same menu item, or going into /Assets/Resources/TagData and clicking "Sync TagData" in the inspector there.

Earlier version (1.0 and earlier) will require adding these tags manually before syncing.

#Custom Building

You'll need to create a folder in Assets for the dll's, I personally use Assets/3rdParty/SpaceuppyUnityFramework. The SpacepuppyUnityFramework dll and .pdb go in there (a .mdb will also be generated by unity, this will allow for code stepping when debugging). I then create a folder Assets/3rdParty/SpaceuppyUnityFramework/Editor and place the SpacepuppyUnityFrameworkEditor dll and .pdb there.

You will also want to go to the PlayerSettings and set the Api compatability level to .Net 2.0, and not 2.0 subset.

Next you'll want to set the execution order of 3 classes in the framework. Of course, if you have meta files turned on, you could just include the supplied SpacepuppyUnityFramework.dll.meta file instead (found in the Resources folder, just place in the same folder as the dll). Those 3 classes are:

com.spacepuppy.GameLoopEntry : -32000

com.spacepuppy.Hooks.EarlyExecutionUpdateEventHooks : -31990

com.spacepuppy.Utils.SpecializedCoponents.EarlyParentSetter : -31980

com.spacepuppy.Hooks.TardyExecutionUpdateEventHooks : 32000

Lastly, make sure to go to "Spacepuppy->Settings->Sync TagData".

This will add the required 'MultiTag' and 'Root' tags, as well as sync any of your existing tags to a resource that can be read at runtime. Any time you add new tags you must sync the tag data again by either clicking this same menu item, or going into /Assets/Resources/TagData and clicking "Sync TagData" in the inspector there.

Now you're fully set up.

#Future Plans I've updated Spacepuppy Framework to work with Unity 5. A final version of 4.6.x support exists as a tagged branch of the project as 1.0.0.198, and is also included as a build in the builds section of the git page. You can fork off this branch to continue work in a 4.6.x setting if you want. All future versions will be number 2.x and will be Unity 5 exclusive.

A unitypackage is still a possibility, but really all it would do is paste the dll's into the folder as described in 'Quick Import', so really, I don't see the need for it.

spacepuppy-unity-framework's People

Contributors

lordofduct avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.