Skip to content

Need to build your unity project, but don't want to bundle unity? Use this to mock out/fake/stub unity!

License

Notifications You must be signed in to change notification settings

melonmouse/UnityEngineMock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

UnityEngineMock

Note: this project is not affiliated with Unity. The implementation was done without looking at the source code of Unity.

Drop-in mock / fake / stub for UnityEngine

UnityEngineMock can be useful if you have your own build process, and some lingering (but not critical) dependenies on Unity. It can also be useful for (unit-/integration-)testing purposes.

This project was hacked together quickly, if it is missing functionality feel free to let me know (open an issue) or write a pull request.

To use this, you could do something like:

#if MOCK_UNITYENGINE
using UnityEngineMock;
#else
using UnityEngine;
#endif

Fakes - Mostly complete and functioning

These will mostly work as you are used to. Some parts are not implemented (yet).

  • Mathf
  • Vector2
  • Vector3
  • Vector2Int
  • Debug

Fakes - Incomplete but functioning

Only specific parts are implemented. Those parts will mostly work as you are used to.

  • Time
  • TextAsset
  • Resources
  • Application

Stubs - Incomplete, non-functioning

These are meant to help compile. They don't have much functionality.

  • MonoBehavior
  • GameObject
  • Object
  • Component
  • Transform
  • RectTransform
  • Quaternion
  • Color
  • Image
  • Canvas
  • Input
  • KeyCode

About

Need to build your unity project, but don't want to bundle unity? Use this to mock out/fake/stub unity!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages