hecomi / uREPL

In-game powerful REPL environment for Unity3D.
http://tips.hecomi.com/entry/2015/12/05/003000
MIT License
551 stars 54 forks source link

Auto-Load Namespaces. #15

Closed ShivanshuKantPrasad closed 5 years ago

ShivanshuKantPrasad commented 6 years ago

I find myself loading a few namespaces always. Is there a way to specify(maybe through scripting) a list of namespaces to auto load.

Kabie commented 5 years ago

I'm using a simple script to achieve this.

using UnityEngine;
using uREPL;

public class ReplPreload : MonoBehaviour
{
    public string[] Commands;

    void Start()
    {
        foreach (var command in Commands)
        {
            Evaluator.Evaluate(command);
        }
    }
}
hecomi commented 5 years ago

Sorry for my late work..., but I've added Pre-Load Command text area to uREPL.Main component from v0.6.0. The code written here is run just after starting scene like @Kabie wrote above. https://github.com/hecomi/uREPL/releases/tag/v0.6.0

Please write here namespaces which you want to use like below:

using UnityEngine.UI;
using UnityEngine.XR;