Skip to content

Instantly share code, notes, and snippets.

View bernatgy's full-sized avatar
🏠
Mainly freelancing right now

Bernát Gyovai bernatgy

🏠
Mainly freelancing right now
  • Zardify
  • Hungary
View GitHub Profile
@bernatgy
bernatgy / TerrainAuthoring.cs
Last active March 12, 2024 18:57
Solution to terrain baking in Unity DOTS. Could be improved with chunks, baking systems, etc... All credits to the lovely folks over at https://forum.unity.com/threads/using-unity-terrain-with-dots-workflow.755105/ I just cut it together, made some small adjustments and made sure it still works with *Entities 1.2.0-pre.6*
using System;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Physics;
using UnityEngine;
using UnityEngine.Serialization;
namespace Custom.Authoring
{
@bernatgy
bernatgy / gist:217731ee8074e515e33ce8641ba647d5
Created March 12, 2024 18:45
Cut together, less than optimal solution to terrain baking in Unity DOTS. Could probably be improved with chunks, baking systems, etc...
using System;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Physics;
using UnityEngine;
using UnityEngine.Serialization;
namespace Custom.Authoring
{
@bernatgy
bernatgy / youtube-playlist-cleaner.js
Created March 5, 2023 13:12
A script to execute in the Browser DevTools Console to slowly clear out your Watch Later playlist
function openMenu() {
var items = document.querySelectorAll('ytd-playlist-video-renderer > #menu button');
items[0].click();
}
function clickRemove() {
var menuItems = document.querySelectorAll('tp-yt-paper-listbox > ytd-menu-service-item-renderer');
menuItems[2].click();
}