Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[DEPRECATED] Terrain Pressure Paint - Paint terrain with your pressure sensitive stylus inside Unity

Discussion in 'Assets and Asset Store' started by steego, Feb 26, 2015.

  1. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,827
    FieldInfo treeSizeField =
    m_TreePainterType.GetField("brushSize", treeFlags);
     
  2. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    861
    I'm guessing the m_TreePainterType is the one that's null, it should get its value from m_TreePainterType = m_EditorAssembly.GetType("UnityEditor.TreePainter");

    So probably they've done something with the tree painter in 2019.1, you can try to look for it if it's just been moved, or you can just remove everything related to painting trees if that's not something you use.
     
  3. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,827
    Thanks, yes I'm using it a lot for trees.
    And yes I think they have done something with trees in the alpha, just I don't know what they did.
    Any tips on how I can look for what has changed?
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,827
    I think its because some of the api is named experimental in the alpha,
    I'm not to worried about it now
     
  5. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    861
    Yeah I'd advise you to wait until it leaves alpha before you start mucking about with it, by then the source code should be available here: https://github.com/Unity-Technologies/UnityCsReference

    You basically need to reverse engineer what they've done to the UnityEditor.TreePainter type, if it's just a rename you just have to rename it in the code, if it's more substantial, you have to figure out how the tree painting works now, and adjust accordingly, sorry I can't be more specific than that.
     
    Lars-Steenhoff likes this.
  6. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,827
    Yes I know what you mean, I was looking a the source code and saw it's only for 2018, so I decided to wait it out.
    I even managed to find the the list of functions for the alpha, and then I saw it said experimental in front of the new terrain functions.

    probably just a name change.
    I will get back to it when the 2019 gets into beta.
     
    steego likes this.