private static void CopyAllRules(MenuCommand item)
        {
            WallRuleTile tile = item.context as WallRuleTile;

            if (tile == null)
            {
                return;
            }

            WallRuleTileRuleWrapper rulesWrapper = new WallRuleTileRuleWrapper();

            rulesWrapper.rules = tile.m_TilingRules;
            var rulesJson = EditorJsonUtility.ToJson(rulesWrapper);

            EditorGUIUtility.systemCopyBuffer = rulesJson;
        }
        private static void PasteRules(MenuCommand item)
        {
            WallRuleTile tile = item.context as WallRuleTile;

            if (tile == null)
            {
                return;
            }

            try
            {
                WallRuleTileRuleWrapper rulesWrapper = new WallRuleTileRuleWrapper();
                EditorJsonUtility.FromJsonOverwrite(EditorGUIUtility.systemCopyBuffer, rulesWrapper);
                tile.m_TilingRules.AddRange(rulesWrapper.rules);
            }
            catch (Exception)
            {
                Debug.LogError("Unable to paste rules from system copy buffer");
            }
        }