Search Unity

Consulo IDE (Intellij IDEA based IDE)

Discussion in 'Scripting' started by SomeAlexander, Oct 22, 2014.

  1. RobRendell

    RobRendell

    Joined:
    Mar 19, 2017
    Posts:
    5
    Thanks, Vistall. I've raised an issue on the Consulo/Consulo github: https://github.com/consulo/consulo/issues/261

    As you can see from the screenshots there, "Help -> Check for updates" appears to go through the motions, but the plugins don't appear to have changed version after the restart.
     
  2. RobRendell

    RobRendell

    Joined:
    Mar 19, 2017
    Posts:
    5
    Ok, so having got my plugins working again (thanks again!), I come to the issue that I was originally going to report, which prompted me to update my plugins/IDE first in case it was an issue with the version I was running :)

    I'm trying to use the UMA system (https://www.assetstore.unity3d.com/en/#!/content/13930), specifically the DynamicCharacterSystem extension. The source for those C# classes are buried pretty deep in the default layout you get with UMA (Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts). When I try to access those scripts from my top-level scripts (in Assets/Scripts), my "using" statements are being marked as unused, and it's unable to resolve the UMA class names. Consulo can find the classes fine if I use control-N "find class name".

    The code compiles without error in Unity proper, which is why I'm posting this in the Consulo thread - it seems to be a problem with Consulo (or how I'm using it).

    I'd rather not rearrange the UMA files, since that will make upgrading etc. more difficult.

    I'm not well versed in C# - I'm much more familiar with Java (hence, familiar with Intellij Idea and wanting to use Consulo :) ). I may be doing something wrong in the way I'm trying to do the "using", since C# modules don't correspond 1:1 with the filesystem like Java packages do. I also thought I might need to mark the Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts directory as a "source directory", but if that's a thing in Consulo then I can't work out how to do it.

    Here's some sample code that isn't working for me. The classes DynamicCharacterAvatar and
    DnaSetter are coming up as undefined.

    Code (CSharp):
    1. using UnityEngine;
    2. using UMA;
    3. using UMACharacterSystem;
    4. using System.Collections.Generic;
    5.  
    6. public class NotWorkingCharacter {
    7.  
    8.     private GameObject avatar;
    9.  
    10.     public NotWorkingCharacter(GameObject avatarPrefab, Vector3 position) {
    11.         avatar = GameObject.Instantiate(avatarPrefab);
    12.         avatar.transform.position = position;
    13.         avatar.transform.rotation = Quaternion.Euler(0, 0, 0);
    14.         RandomizeAvatar();
    15.     }
    16.  
    17.     private void RandomizeAvatar() {
    18.         DynamicCharacterAvatar dynamicCharacterAvatar = avatar.GetComponent<DynamicCharacterAvatar>();
    19.  
    20.         // Set Random DNA
    21.         Dictionary<string, DnaSetter> setters = dynamicCharacterAvatar.GetDNA();
    22.         foreach (KeyValuePair<string, DnaSetter> dna in setters)
    23.         {
    24.             dna.Value.Set(0.35f + (Random.value * 0.3f));
    25.         }
    26.  
    27.         dynamicCharacterAvatar.BuildCharacter();
    28.         dynamicCharacterAvatar.ForceUpdate(true, false, false);
    29.     }
    30. }
     
    Last edited: Apr 27, 2017
  3. RobRendell

    RobRendell

    Joined:
    Mar 19, 2017
    Posts:
    5
  4. VISTALL

    VISTALL

    Joined:
    Oct 22, 2014
    Posts:
    28
    sfjohansson likes this.