Hello!!! This gist used to contain the spec for the Blotter file format (save files used by Logic World). But that info is now hosted on the Logic World Wiki.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Frozen; | |
| using System.Text.RegularExpressions; | |
| using BenchmarkDotNet.Loggers; | |
| /// <summary> | |
| /// Custom logger for printing BenchmarkDotNet output to console. | |
| /// Prints much less output than the default <see cref="ConsoleLogger"/>, so you can focus on the most important parts of the output. | |
| /// </summary> | |
| public partial class FocusLogger : ILogger | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Program | |
| { | |
| static void Main() | |
| { | |
| Console.WriteLine("Enter tiktok ID"); | |
| ulong id = ulong.Parse(Console.ReadLine()); | |
| ulong shifted = id >> 32; | |
| var date = DateTime.UnixEpoch.AddSeconds(shifted); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // These are methods for turning C# type variables into and out of strings that look like C# code. | |
| // It has full support for generics (including unbound generics) and arrays of all dimensions. | |
| // Examples of strings generated/parsed: | |
| // System.Int32 | |
| // System.Collections.Generic.List<System.Int32> | |
| // System.Collections.Generic.List<> | |
| // System.Int32[] | |
| // System.Int32[,,] | |
| // System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.Int32[,,]>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Reflection; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| using ShadowResolution = UnityEngine.Rendering.Universal.ShadowResolution; | |
| /// <summary> | |
| /// Enables getting/setting URP graphics settings properties that don't have built-in getters and setters. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a version of System.Collections.Generic.Dictionary<TKey, TValue> where both types can act as keys and values. | |
| // For example, you could have a TwoWayDictionary<string, int>. This would be able to look up ints by string, but | |
| // it would ALSO be able to look up strings by int. | |
| // All the code in this class is O(1) except for the seeded constructors. | |
| // you are free to use and modify this code for anything, full licence terms at the end of the file. | |
| using System.Collections.Generic; | |
| using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vector3 QuaternionToEuler(Quaternion q) | |
| { | |
| Vector3 euler; | |
| // if the input quaternion is normalized, this is exactly one. Otherwise, this acts as a correction factor for the quaternion's not-normalizedness | |
| float unit = (q.x * q.x) + (q.y * q.y) + (q.z * q.z) + (q.w * q.w); | |
| // this will have a magnitude of 0.5 or greater if and only if this is a singularity case | |
| float test = q.x * q.w - q.y * q.z; |