今後の version up 対応もあるし難解かもしれませんが書いておきます。
NGUI の部分は変わらないと思うので記述する部分はそう変わらないと思います。
UIlLabel ( : UIWidget : UIRect)

lblActivateInGame
UILabel
UIRect 部分

public abstract class UIRect : MonoBehaviour
{
public AnchorPoint leftAnchor;
public AnchorPoint rightAnchor;
public AnchorPoint bottomAnchor;
public AnchorPoint topAnchor;
public AnchorUpdate updateAnchors;
}
public class AnchorPoint
{
public Transform target;
public float relative;
public int absolute;
}
より
leftAnchor.target = null;
leftAnchor.relative = 0f;
leftAnchor.absolute = 0;
rightAnchor.target = null;
rightAnchor.relative = 1f;
rightAnchor.absolute = 0;
bottomAnchor.target = null;
bottomAnchor.relative = 0f;
bottomAnchor.absolute = 0;
topAnchor.target = null;
topAnchor.relative = 1f;
topAnchor.absolute = 0;
updateAnchors = AnchorUpdate.OnUpdate
UIWidget 部分

public class UIWidget : UIRect
{
protected Color mColor;
protected Pivot mPivot;
protected int mWidth;
protected int mHeight;
protected int mDepth;
public bool autoResizeBoxCollider;
public bool hideIfOffScreen;
public AspectRatioSource keepAspectRatio;
public float aspectRatio;
}
より
mColor = Color.white;
mPivot = Pivot.Center;
mWidth = 114;
mHeight = 30;
mDepth = -20;
autoResizeBoxCollider = false;
hideIfOffScreen = false;
keepAspectRatio = AspectRatioSource.Free;
aspectRatio = 3.736842
UILabel 部分

public class UILabel : UIWidget
{
public Crispness keepCrispWhenShrunk;
Font mTrueTypeFont;
UIFont mFont;
string mText;
int mFontSize;
FontStyle mFontStyle;
Alignment mAlignment;
bool mEncoding;
int mMaxLineCount;
Effect mEffectStyle;
Color mEffectColor;
NGUIText.SymbolStyle mSymbols;
Vector2 mEffectDistance;
Overflow mOverflow;
Material mMaterial;
bool mApplyGradient;
Color mGradientTop;
Color mGradientBottom;
int mSpacingX;
int mSpacingY;
bool mUseFloatSpacing;
float mFloatSpacingX;
float mFloatSpacingY;
bool mOverflowEllipsis;
int mOverflowWidth;
}
より
keepCrispWhenShrunk = Crispness.OnDesktop;
mTrueTypeFont = font_body.ttf;
mFont = resources_00002.-15; (UIFont)
mText = "Pick up Item";
mFontSize = 36;
mFontStyle = FontStyle.Normal;
mAlignment = Alignment.Automatic;
mEncoding = true;
mMaxLineCount = 0;
mEffectStyle = Effect.Outline;
mEffectColor = Color.black;
mSymbols = NGUIText.SymbolStyle.Normal;
mEffectDistance = Vector2.one;
mOverflow = Overflow.ResizeFreely;
mMaterial = null;
mApplyGradient = false;
mGradientTop = Color.white;
mGradientBottom = Color(0.7f, 0.7f, 0.7f);
mSpacingX = 0;
mSpacingY = 0;
mUseFloatSpacing = false;
mFloatSpacingX = 0;
mFloatSpacingY = 0;
mOverflowEllipsis = false;
mOverflowWidth = 1;
となる。
今回いじっているのは UILabel.mTrueTypeFont と UILabel.mFont なのでこのアドレスが理解できると良いです。
NGUI の部分は変わらないと思うので記述する部分はそう変わらないと思います。
UIlLabel ( : UIWidget : UIRect)

lblActivateInGame
UILabel
UIRect 部分

public abstract class UIRect : MonoBehaviour
{
public AnchorPoint leftAnchor;
public AnchorPoint rightAnchor;
public AnchorPoint bottomAnchor;
public AnchorPoint topAnchor;
public AnchorUpdate updateAnchors;
}
public class AnchorPoint
{
public Transform target;
public float relative;
public int absolute;
}
より
leftAnchor.target = null;
leftAnchor.relative = 0f;
leftAnchor.absolute = 0;
rightAnchor.target = null;
rightAnchor.relative = 1f;
rightAnchor.absolute = 0;
bottomAnchor.target = null;
bottomAnchor.relative = 0f;
bottomAnchor.absolute = 0;
topAnchor.target = null;
topAnchor.relative = 1f;
topAnchor.absolute = 0;
updateAnchors = AnchorUpdate.OnUpdate
UIWidget 部分

public class UIWidget : UIRect
{
protected Color mColor;
protected Pivot mPivot;
protected int mWidth;
protected int mHeight;
protected int mDepth;
public bool autoResizeBoxCollider;
public bool hideIfOffScreen;
public AspectRatioSource keepAspectRatio;
public float aspectRatio;
}
より
mColor = Color.white;
mPivot = Pivot.Center;
mWidth = 114;
mHeight = 30;
mDepth = -20;
autoResizeBoxCollider = false;
hideIfOffScreen = false;
keepAspectRatio = AspectRatioSource.Free;
aspectRatio = 3.736842
UILabel 部分

public class UILabel : UIWidget
{
public Crispness keepCrispWhenShrunk;
Font mTrueTypeFont;
UIFont mFont;
string mText;
int mFontSize;
FontStyle mFontStyle;
Alignment mAlignment;
bool mEncoding;
int mMaxLineCount;
Effect mEffectStyle;
Color mEffectColor;
NGUIText.SymbolStyle mSymbols;
Vector2 mEffectDistance;
Overflow mOverflow;
Material mMaterial;
bool mApplyGradient;
Color mGradientTop;
Color mGradientBottom;
int mSpacingX;
int mSpacingY;
bool mUseFloatSpacing;
float mFloatSpacingX;
float mFloatSpacingY;
bool mOverflowEllipsis;
int mOverflowWidth;
}
より
keepCrispWhenShrunk = Crispness.OnDesktop;
mTrueTypeFont = font_body.ttf;
mFont = resources_00002.-15; (UIFont)
mText = "Pick up Item";
mFontSize = 36;
mFontStyle = FontStyle.Normal;
mAlignment = Alignment.Automatic;
mEncoding = true;
mMaxLineCount = 0;
mEffectStyle = Effect.Outline;
mEffectColor = Color.black;
mSymbols = NGUIText.SymbolStyle.Normal;
mEffectDistance = Vector2.one;
mOverflow = Overflow.ResizeFreely;
mMaterial = null;
mApplyGradient = false;
mGradientTop = Color.white;
mGradientBottom = Color(0.7f, 0.7f, 0.7f);
mSpacingX = 0;
mSpacingY = 0;
mUseFloatSpacing = false;
mFloatSpacingX = 0;
mFloatSpacingY = 0;
mOverflowEllipsis = false;
mOverflowWidth = 1;
となる。
今回いじっているのは UILabel.mTrueTypeFont と UILabel.mFont なのでこのアドレスが理解できると良いです。
コメント