suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

Error after version update #2478

Closed CLAXES closed 1 month ago

CLAXES commented 1 month ago

Hello, I was using version 1.86d before, now I have updated to version 1.88e, I get the error in the picture, what should I do?

image

Niinra commented 1 month ago

You also have a component that references the script that is asking you and possibly that is why it throws the nullreference error. image Check which prefabs are missing the reference to a script and if you find the prefab send me a photo so I know which script goes there

insthync commented 1 month ago

Fixed, I hope you can fix it by yourself, it is very easy.

CLAXES commented 1 month ago

Ayrıca size soran betiğe referans veren bir cihazınız de var ve muhtemelen bu nedenle boş referans hatası veriyor. Hangi prefabriklerde bir komut dosyası referansının eksik olup olmadığını kontrol edin ve prefabrik bulursanız bana bir fotoğraf gönderin, böylece hangi betiğin gideceğini bileyim görüntü

I have corrected the missing reference but this error still persists in the character list.

image

CLAXES commented 1 month ago

I think the problem is caused by the code at the bottom of this item

            // Setup equipment entity
            tempEquipmentEntity = null;
            if (tempEquipmentObject != null)
            {
                tempEquipmentEntity = tempEquipmentObject.GetComponent<BaseEquipmentEntity>();
                if (tempEquipmentEntity != null)
                {
                    tempEquipmentEntity.Setup(this, tempEquipmentModel.equipPosition, tempEquipmentModel.item);
                    tempEquipmentEntity.SetupRefToPrefab(tempEquipmentModel.meshPrefab);
                }
                if (CacheRightHandEquipmentEntity == null && GameDataConst.EQUIP_POSITION_RIGHT_HAND.Equals(tempEquipmentModel.equipPosition))
                    CacheRightHandEquipmentEntity = tempEquipmentEntity;
                if (CacheLeftHandEquipmentEntity == null && GameDataConst.EQUIP_POSITION_LEFT_HAND.Equals(tempEquipmentModel.equipPosition))
                    CacheLeftHandEquipmentEntity = tempEquipmentEntity;
            }

I do not get an error when I cancel the following place

// tempEquipmentEntity.SetupRefToPrefab(tempEquipmentModel.meshPrefab);

image

am I getting this error because mesh is not defined in items?

insthync commented 1 month ago

What you have to do is simple, just add codes to avoid null ref, that is it ;)