void OnEnable()
 {
     m_img = transform.GetComponent <IrregularRawImage>();
     if (idx < m_img.path.Count && idx >= 0)
     {
         m_vec = m_img.path[idx];
     }
 }
 // Start is called before the first frame update
 protected void OnEnable()
 {
     //Debug.LogError(serializedObject);
     this.m_VecContent = new GUIContent("point");
     m_index           = serializedObject.FindProperty("idx");
     m_Vec             = serializedObject.FindProperty("vec");
     m_target          = (target as IrregularVertController);
     m_img             = m_target.transform.GetComponent <IrregularRawImage>();
 }
Beispiel #3
0
    protected override void OnEnable()
    {
        base.OnEnable();
        m_Img = target as IrregularRawImage;
        m_Img.doPolygonUpdate = true;
        //rectTransform = m_Img.rectTransform;

        // m_Points = serializedObject.FindProperty("path");
        m_keepOriginSize = serializedObject.FindProperty("keepOriginSize");
    }
 public void TryApplyProp(IrregularRawImage img)
 {
     if (m_vec != vec)
     {
         m_vec = vec;
         if (idx < img.path.Count && idx >= 0)
         {
             img.path[idx]       = m_vec;
             img.doPolygonUpdate = true;
         }
     }
 }