/// <summary> /// 値をオブジェクトに反映させる /// </summary> /// <param name="property">プロパティ</param> public void SetValues(SkinPartsPropertry property) { //値がないなら何もしない if (property.objectReferenceValues.Count < ObjectLength) { return; } if (!graphic) { graphic = property.objectReferenceValues[GraphicIndex] as Graphic; //空か形違いのため処理終了 if (!graphic) { return; } } if (!material) { material = property.objectReferenceValues[MaterialIndex] as Material; } graphic.material = material; SkinnerUtility.ReloadGameObject(graphic); }
/// <summary> /// 値をオブジェクトに反映させる /// </summary> /// <param name="property">プロパティ</param> public void SetValues(SkinPartsPropertry property) { //値がないなら何もしない if (property.objectReferenceValues.Count < ObjectLength) { return; } if (!rawImage) { rawImage = property.objectReferenceValues[RawImageIndex] as RawImage; //空か型違いのため処理終了 if (!rawImage) { return; } } if (!texture2D) { texture2D = property.objectReferenceValues[Texture2DIndex] as Texture2D; } rawImage.texture = texture2D; SkinnerUtility.ReloadGameObject(rawImage); }
/// <summary> /// 値をオブジェクトに反映させる /// </summary> /// <param name="property">プロパティ</param> public void SetValues(SkinPartsPropertry property) { //値がないなら何もしない if (property.objectReferenceValues.Count < ObjectLength) { return; } if (!image) { image = property.objectReferenceValues[ImageIndex] as Image; //空か型違いのため処理終了 if (!image) { return; } } if (!sprite) { sprite = property.objectReferenceValues[SpriteIndex] as Sprite; } image.sprite = sprite; SkinnerUtility.ReloadGameObject(image); }