如何通过删除条目来更新现有JSON文件

时间:2018-05-09 17:26:57

标签: json powershell

public class Example : MonoBehaviour
{
    private Bounds _initialUnrotatedBounds;

    private void Awake()
    {
        InitializeUnrotatedBounds();
    }

    private void InitializeUnrotatedBounds()
    {
        Assert.IsTrue(transform.rotation == Quaternion.identity);

        _initialUnrotatedBounds = GetComponent<MeshRenderer>().bounds;
    }

    private void Update()
    {
        // Use the cached bounds. Now, even for moving objects,
        // it doesn't matter if the rotation changes
        float height = _initialUnrotatedBounds.size.y;
        Debug.Log(height);
    }
}

我无法弄清楚如何从JSON对象中删除元素并更新 EXISTING 文件。

我在Windows 10上使用PowerShell 5.1

0 个答案:

没有答案