Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How can I integrate CSS?

Discussion in 'Immediate Mode GUI (IMGUI)' started by alexander, Apr 3, 2008.

  1. alexander

    alexander

    Joined:
    Mar 28, 2008
    Posts:
    180
    Aloha

    I've got a question for GUIStyling with CSS.
    I've read in the script reference this article:
    http://unity3d.com/support/documentation/ScriptReference/GUIStyle.html

    But how can I implement this in unity?
    Separate folder in the project pane with the css-file which is attached to a GameObject (like a cube)????
    Attached too the GUI.skin???

    Thanks for every help :)

    Alex
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    I'm afraid there's a bit of confusion;

    UnityGUI skinning is CSS-like, it does not use CSS. Basically you need to set up all your styles inside a Unity GUISkin, which you then use for displaying.

    So having a knowledge of CSS will help you as you grasp this system, it doesn't let you pull in CSS files.
     
  3. alexander

    alexander

    Joined:
    Mar 28, 2008
    Posts:
    180
    Hi nicholas :)

    That were the words I wanted to hear!
    So, the last 3 hours were for the birds ;-)

    OKay, thx for your quick help.
     
  4. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Note: Though it would be an interesting collaboration project to make a CSS to UnityGUI parser.