private MutableObject ComputeSchemaFromBounds(IEnumerable <BoundingBox> bounds) { List <MutableObject> payloadList = bounds.Select(bound => bound.Data).ToList(); var schemaList = MutableObject.GetUniqueSchemas(payloadList); return(MutableObject.UnionSchemas(schemaList)); }
public void Update() { if (!Exec) { return; } Exec = false; MutableObject schema1 = new MutableObject { { "nested items", new MutableObject { { "int item", 500 }, { "string item", "FooBarBaz" } } }, { "Deep nested item", new MutableObject { { "Deep at last", new MutableObject { { "The list", new List <MutableObject> { new MutableObject { { "float points", 12f }, { "string team", "ThisTeam" }, { "ambiguous Score", "winner" } } } } } }, } }, { "something else", 4.2f } }; MutableObject schema2 = new MutableObject { { "nested items", new MutableObject { { "int item", 50000 }, { "float item", 45.5f } } }, { "Deep nested item", new MutableObject { { "Deep at last", new MutableObject { { "The list", new List <MutableObject> { new MutableObject { { "float points", 11f }, { "string team", "ThisTeam" }, { "ambiguous Score", 12f } } } } } }, } }, { "something else", 4 } }; //Debug.Log( "=======Schema1!=======" ); //schema1.DebugMutable(); // //Debug.Log("=======Schema2!======="); //schema2.DebugMutable(); var outSchema = MutableObject.UnionSchemas(schema1, schema2); Debug.Log("=======Schema union!======="); outSchema.DebugMutable(); }