This repository was archived by the owner on Dec 12, 2023. It is now read-only.
  
  
  
  
fixed jslib to use callbacks, cleaned up #3
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Previously: method names were passed as strings, a SendMessage was used that searches for a monobehaviour with a given name (not quite reliable/efficient way of passing things in Unity).
Currently: methods are marshalled as proper callbacks. A MonoBehaviour in the scene is no longer necessary for this awesome system to work.
I also added small fixes to jslib so that things can be passed around between functions without using
window. I suppose it can be further optimized, but I don't know how it ended up so complicated in the first place so I left it generally intact.