Unity With C# script : Class Data Type Passing Value From Class With Data Twice Weird

后端 未结 2 1615
无人及你
无人及你 2021-01-24 11:32

I got a simple Question and weird from passing value to data type class variable.

the code like below :

void AddItem(int ID) {
    for (int i = 0; i <         


        
2条回答
  •  半阙折子戏
    2021-01-24 12:14

    In item constructor you are doing it:

    this.baseName = folder + "/";
    itemIcon = this.baseName + itemName;
    

    where folder == Corps and this.baseName == "Corps/Lemon/" and itemName == "Lemon" so you have exactly what you should get.

提交回复
热议问题