Search Unity

2D Graphics Programming API

Discussion in 'Scripting' started by oliversb, Aug 24, 2014.

  1. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    Is there a standard 2D graphics API that is standard for a 2D game engine?

    Like this:
    http://www.createjs.com/Docs/EaselJS/classes/Graphics.html

    I want to be able to draw textures using this style of 2D graphics programming and use them textures in 3D and/or 2D games made in Unity.

    What should I look out to go about doing this?

    I need functions like:
    DrawRect
    DrawLine
    ForeColor

    The standard stuff.

    Thanks
     
  2. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
  3. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    Thanks. It seems to be what I am looking for. If the API is in the ActionScript style I described it does not matter as long as it is effective with doing what I am trying to achieve.

    But I am sorry but I am looking for something free.

    Thanks and good suggestion
     
  4. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    I maybe should have mentioned that I am trying to use these functions to draw a texture.
     
  5. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
    Are you a beginner? Because there isn't anything beginner friendly for free as far as I'm aware. you can create texture's at runtime and assign them to sprites etc but it requires knowledge of the Unity API's etc
     
  6. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    Yes, I am a beginner to Unity (sort of). I am certainty not an advanced Unity user, lets put it that way. What bits of the Unity API should I learn? I have recently been learning some OpenGL but I thought that somebody will have already created a free and simple API that handles the low-level OpenGL for you.

    Thanks
     
  7. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    I have been programming for at least two years. I used to program when I was younger also but I was pretty bad back then (as far as I can remember). Thanks
     
  8. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
  9. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    Thanks
     
  10. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
  11. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    Thanks a ton. Looks exactly like what I was looking for. :)

    It kind of sucks that Unity does not have this built-in but then again it awesome what the community does.
     
  12. oliversb

    oliversb

    Joined:
    Aug 23, 2014
    Posts:
    11
    How do I access the alpha mask? Thanks