コード例 #1
1
    Object sourceScript; //script that this window was called from

    #endregion Fields

    #region Methods

    public void toggleGUI(Soldiers soldierScript, Object sourceScript)
    {
        showSoldierManager = !showSoldierManager;

        currentSoldier = this.gameObject.AddComponent<Soldiers>();
        currentSoldier = soldierScript.GetSoldierInfo (currentSoldier);

        this.sourceScript = sourceScript;
    }