Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

OnPopulateMesh obsolete!

Discussion in 'UGUI & TextMesh Pro' started by andymads, Oct 22, 2015.

  1. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    What's the recommended way to do this now OnPopulateMesh is obsolete?

    Code (CSharp):
    1. [RequireComponent(typeof(RectTransform))]
    2. public class EmptyGraphic : Graphic
    3. {
    4.      protected override void OnPopulateMesh(Mesh m)
    5.     {
    6.         m.Clear();
    7.     }
    8. }
    9.  
     
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,683
    It's replaced with
    Code (CSharp):
    1. protected override void OnPopulateMesh(VertexHelper vh)
    Check the UI Primitives scripts in the UI Extensions project (develop_5.3 branch) for some examples for how to update any code you may have. (compare the different branches from 4.6 to 5.3)
    Basically, that method signature only lasted for the base release and was updated in the first "patch" release.
     
  3. rubendariohh

    rubendariohh

    Joined:
    Oct 14, 2017
    Posts:
    32
    upload_2022-10-14_8-25-48.png

    Assets\com.unity.uiextensions\Runtime\Scripts\Effects\UIParticleSystem.cs(134,33): warning CS0809: Obsolete member 'UIParticleSystem.OnPopulateMesh(VertexHelper)' overrides non-obsolete member 'Graphic.OnPopulateMesh(VertexHelper)'