Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliSense in Visual Studio when using Unity3d

How to add IntelliSense and Syntax Highlighting to Visual Studio 2013 when I call it from Unity3d?

Now I have a code:

using UnityEngine;
using System.Collections;

public class cubeScript : MonoBehaviour
{
    // Use this for initialization
    void Start ()
    {

    }

    // Update is called once per frame
    void Update ()
    {
        if (Input.GetKeyDown(KeyCode.R))
            gameObject.renderer.material.color = Color.red;
        else if (Input.GetKeyDown(KeyCode.B))
            gameObject.renderer.material.color = Color.blue;
        if (Input.GetKeyDown(KeyCode.G))
            gameObject.renderer.material.color = Color.green;
    }
}

.. and it is all black

like image 958
Dima Kozyr Avatar asked Mar 20 '14 21:03

Dima Kozyr


1 Answers

I'm assuming you've seen this documentation about how to properly use Visual Studio with Unity C#: http://docs.unity3d.com/Documentation/Manual/VisualStudioIntegration.html

Verify if you're using VS Express or Professional.

My only suggestion would be to retry those steps for your project, or look into acquiring UnityVS. UnityVS is an asset package that you import into your Unity project, and it allows you to use Visual Studio's Debugger with Unity.

Alternatively, Sublime Text Editor has beautiful syntax highlighting for Unity C#, but does not compile or debug your code.

Best of luck.

like image 198
FunkShake Avatar answered Sep 27 '22 17:09

FunkShake