Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
396B

  1. #if UNITY_5 || UNITY_5_3_OR_NEWER
  2. #region
  3. using System;
  4. using Svelto.DataStructures;
  5. using UnityEngine;
  6. #endregion
  7. namespace Svelto.Context
  8. {
  9. public class MonoBehaviourFactory : Factories.IMonoBehaviourFactory
  10. {
  11. virtual public M Build<M>(Func<M> constructor) where M : MonoBehaviour
  12. {
  13. var mb = constructor();
  14. return mb;
  15. }
  16. }
  17. }
  18. #endif