Zenject 发表于 2020-04-01 | 更新于 2020-04-04 | 分类于 Unity 本文字数: 456 | 阅读时长 ≈ 1 分钟 思考并回答以下问题: Hello World Example123456789101112131415161718192021using Zenject;using UnityEngine;using System.Collections;public class TestInstaller : MonoInstaller{ public override void InstallBindings() { Container.Bind<string>().FromInstance("Hello World"); Container.Bind<Greeter>().AsSingle().NonLazy(); }}// Greeter 迎宾public class Greeter{ public Greeter(string message) { Debug.Log(message); } }