예제 #1
0
    void ResizePanel()
    {
        if (m_UIPanel == null)
        {
            m_UIPanel = GetComponent("UIPanel");
        }

        if (m_UIPanel != null)
        {
            // UIRoot
            object uiRoot = SSReflection.GetPropValue(m_UIPanel, "root");

            // Get Size
            float h = (float)(int)SSReflection.GetPropValue(uiRoot, "activeHeight");
            float w = h * Screen.width / Screen.height;

            // Set clipping to ConstrainButDontClip
            SSReflection.SetPropValue(m_UIPanel, "clipping", ConstrainButDontClip);

            // Set clipping region
            SSReflection.SetPropValue(m_UIPanel, "baseClipRegion", new Vector4(0, 0, w, h));
        }
    }
예제 #2
0
 void SetColorReflection(Component comp, Color color)
 {
     SSReflection.SetPropValue(comp, "color", color);
 }
예제 #3
0
 void SetColorReflection(Component comp, string text)
 {
     SSReflection.SetPropValue(comp, "text", text);
 }