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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How would I generate polygons via a script?

Discussion in 'Scripting' started by Diericx, Nov 7, 2015.

  1. Diericx

    Diericx

    Joined:
    Jun 8, 2013
    Posts:
    62
    I want to generate a bunch of random, low poly polygons. This is going to be for my map generation, its just for some background details.

    How would I do this? Is it possible to generate polygons with a script or do I have to use preset polygons made in Maya?

    Thanks!:)
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Use the Mesh class.

    --Eric
     
    Kiwasi likes this.
  3. Diericx

    Diericx

    Joined:
    Jun 8, 2013
    Posts:
    62
    Woah that's exactly what I need, I can't believe I didn't see this! thanks!!
     
    Kiwasi likes this.