// public static string ExtGetFullName(this PeEntity entity) // { // EntityInfoCmpt info = entity.GetCmpt<EntityInfoCmpt>(); // // if (null == info) // { // return null; // } // // return info.characterName.fullName; // } public static void SetAvatarData(this PeEntity entity, AppearBlendShape.AppearData appearData, CustomCharactor.AvatarData nudeAvatarData) { AvatarCmpt v = entity.GetCmpt <AvatarCmpt>(); if (null != v) { v.SetData(appearData, nudeAvatarData); } }
public static void SetAvatarNpcModelPath(this PeEntity entity, string value) { if (null == entity) { return; } AvatarCmpt avatar = entity.GetCmpt <AvatarCmpt>(); if (null == avatar) { return; } CustomCharactor.AvatarData nudeAvatarData = new CustomCharactor.AvatarData(); nudeAvatarData.SetPart(CustomCharactor.AvatarData.ESlot.HairF, value); avatar.SetData(new AppearBlendShape.AppearData(), nudeAvatarData); }