GameObjectComponent.cs 446 B

123456789101112131415161718192021222324
  1. using Model;
  2. using UnityEngine;
  3. namespace Hotfix
  4. {
  5. [ObjectEvent]
  6. public class GameObjectComponentEvent : ObjectEvent<GameObjectComponent>, IAwake<GameObject>
  7. {
  8. public void Awake(GameObject gameObject)
  9. {
  10. this.Get().Awake(gameObject);
  11. }
  12. }
  13. public class GameObjectComponent: Component
  14. {
  15. public GameObject GameObject { get; private set; }
  16. public void Awake(GameObject gameObject)
  17. {
  18. this.GameObject = gameObject;
  19. }
  20. }
  21. }