Init() public méthode

public Init ( bool &isInitialized ) : void
isInitialized bool
Résultat void
Exemple #1
0
    public void Update()
    {
        if (doProcess)
        {
            // Don't be executing code when we're about to reload it.  Not sure this is
            // actually needed but seems prudent to be wary of it.
            if (EditorApplication.isCompiling)
            {
                return;
            }

            helper.Init(ref isInitialized);
            doProcess = false;
            bool compiledCorrectly = helper.Eval(codeToProcess);
            if (compiledCorrectly)
            {
                resetCommand = true;
            }
            else
            {
                // Continue with what enter the user pressed...  Yes, this is an ugly
                // way to handle it.
                codeToProcess = Paste(editorState, "\n", false);
            }
        }
    }
Exemple #2
0
 public void Update()
 {
     if (doProcess)
     {
         if (helper.Init(ref isInitialized))
         {
             doProcess = false;
             bool compiledCorrectly = helper.Eval(logEntries, codeToProcess);
             if (compiledCorrectly)
             {
                 resetCommand = true;
             }
             else
             {
                 // Continue with that enter the user pressed...  Yes, this is an ugly
                 // way to handle it.
                 codeToProcess = Paste(editorState, "\n", false);
             }
         }
         else
         {
             // For some reason, we weren't ready to run.
             // TODO: Make sure it's not some sort of permanent error!
         }
     }
 }