CS0246 Issue, need help.

So I am brand new to C# and I cannot seem to figure out why I am constantly getting this CS426 error. I looks like everything is there. There is a project that I am trying to open, but I keep getting this error code: The type or namespace name ‘UIRect’ could not be found( are you missing a directive or an assembly reference?) I really need some help. Thank you so much!

if !UNITY_3_5
#define DYNAMIC_FONT
#endif

using UnityEngine;
using System.Collections.Generic;
using System;
using Alignment = NGUIText.Alignment;

[ExecuteInEditMode]
[AddComponentMenu("NGUI/UI/NGUI Label")]
public class UILabel : UIWidget
{
    public enum Effect
    {
        None,
        Shadow,
        Outline,
        Outline8,
    }

    public enum Overflow
    {
        ShrinkContent,
        ClampContent,
        ResizeFreely,
        ResizeHeight,
    }

    public enum Crispness
    {
        Never,
        OnDesktop,
        Always,
    }

You’re missing a # for your #if directive in the very first line. You shouldn’t use a comma for the final item in an enum set.

1 Like

Wow, that worked, thank you so much! I’ll get a hang of c# fully one day. I just started this week!