Beispiel #1
0
 void OnAssetUpdated(Spaces.Core.Asset _asset, Spaces.Core.Asset.Process[] last, Spaces.Core.Asset.Process next)
 {
     if (asset == _asset && last.Length > 0)
     {
         Debug.Log(asset.name + " [Switched State] " + last.ToString() + " => " + next.ToString());
     }
 }
Beispiel #2
0
    //public static void CalculateLocalBounds(GameObject go)
    //{
    //    Quaternion currentRotation = go.transform.rotation;
    //    go.transform.rotation = Quaternion.Euler(0f, 0f, 0f);

    //    Bounds bounds = new Bounds(go.transform.position, Vector3.zero);

    //    foreach (Renderer renderer in go.GetComponentsInChildren<Renderer>())
    //    {
    //        bounds.Encapsulate(renderer.bounds);
    //    }

    //    Vector3 localCenter = bounds.center - go.transform.position;
    //    bounds.center = localCenter;

    //    //Debug.Log("Bounds center: " + bounds.center + " | Bounds size: " + bounds.size);

    //    go.transform.rotation = currentRotation;
    //}

    void StateChangeHandler(Spaces.Core.Asset asset, Spaces.Core.Asset.Process[] currentStates, Spaces.Core.Asset.Process state)
    {
        Debug.Log("[Frame " + frame + "] " + asset.name + " (" + asset.id + ") [EVENT!!! " + state.ToString() + "] " + string.Join("|", currentStates.Select(s => s.ToString()).ToArray()));
    }