Ejemplo n.º 1
0
    public void BuildAll()
    {
        List <string> buildTargetNamesByTargetGroup = (from buildTarget in GetComponentsInChildren <EzBuildTarget>()
                                                       orderby buildTarget.buildTarget
                                                       select buildTarget.name).ToList();

        // the scenes are reloaded between each build, so have to refind the targets
        foreach (string childName in buildTargetNamesByTargetGroup)
        {
            EzBuild ezBuild = FindObjectOfType <EzBuild>();

            EzBuildTarget ezbt = (from bt in ezBuild.GetComponentsInChildren <EzBuildTarget>()
                                  where bt.name == childName
                                  select bt).First();

            if (ezBuild.overrideChildSettings)
            {
                ezbt.Build(ezBuild.settings);
            }
            else
            {
                ezbt.Build(ezbt.settings);
            }
        }
    }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        ezBuildTarget = target as EzBuildTarget;

        base.OnInspectorGUI();

        if (GUILayout.Button("Build"))
        {
            ezBuildTarget.Build(ezBuildTarget.settings);
        }
    }