Unity Ugui dynamically add Itemugui dynamic creation element Tears

2023-03-18  

UNITY Ugui Dynamic adding item, pay attention to setting the LocalScale of the Item, otherwise it will be deformed

Public void Initshopitem () 
      {{ 
        FOREACH (KeyValuePair <T, EquipshopiteMData> KV in DataS) 
        {{ 
            GameObject item = Instantiate (ShopiteMPREFAB); 
            item.transform.Setparent (ShopiteMparent); 
            // Set local zoom size to eliminate deformation 
            item.getComPonent <radttransform> (). LocalScale = New Vector3 (1, 1, 1); 
            ShopiteMui ShopiteMui = item.getComponent <stitemui> (); 
            ITemequipment EQUIITEM = (ITemequipment) BaseItemmangager.instance.getdata (kv.value.Itemid); 
            if (Shopitemui! = NULL) 
            {{ 
                ShopiteMui.Setshopitemui (Equiitem.Itemicon, Equiitem.Itemname, Equiitem.itembuy, EquiitemSlll, Equiitem.Itemid); 
            } 
        } 
      }

source

Random Posts

Anti -NP monitoring principle (+bypass np in raing0)

DB2 interface file to the experience that the DB2 interface file to Oracle cannot be imported

inno setup copy folder

jumpServer springboard server deployment

sandbox (Sandbox) file directory acquisition