Skip to content

Instantly share code, notes, and snippets.

View TestStuff.cs
private ModuleBuilder m_module;
[Test]
public void TestComp() {
/*
var assembly = AssemblyDefinitionFor(GetType());
var module = assembly.MainModule;
TypeDefinition cClass = new TypeDefinition(GetType().Namespace, "MyTestJob", TypeAttributes.Class);
@marijnz
marijnz / BurstTest.cs
Last active Feb 16, 2020
Unity Job.Run vs Function Pointer, both bursted
View BurstTest.cs
class BurstTest
{
[BurstCompile]
public struct MultJob : IJob
{
[ReadOnly]
public NativeArray<float> a;
[ReadOnly]
public NativeArray<float> b;
[WriteOnly]
View Wait.cs
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DG.Tweening;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class Void
{
View Utils.cs
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Assets.Scripts.Core
{
public static class Utils
{
public static IEnumerable<FieldInfo> GetFieldsWithAttribute<T>(this Type classType)
{
View Injector.cs
using System;
using System.Collections.Generic;
using Assets.Scripts.Core;
using UnityEngine;
using Object = UnityEngine.Object;
public class Inject : Attribute { }
public class Controller
{
View Job.cs
using System;
using System.Diagnostics;
using Unity.Collections;
using Unity.Jobs;
using Unity.Burst;
using UnityEngine;
using Debug = UnityEngine.Debug;
using static Unity.Mathematics.math;
using Unity.Mathematics;
View Test.cs
[PerformanceTest]
public void FindPolygonBurst()
{
var navMeshData = CreateNavMesh();
var count = 0;
var testPoint = new Vector2(1, 1);
var tile = navMeshData.GetTileAtWorldPosition(testPoint);
View injector.cs
using System;
using System.Collections.Generic;
using Assets.Scripts.Core;
using UnityEngine;
using Object = UnityEngine.Object;
public class Inject : Attribute { }
public class Controller
{
View il.cs
private struct StructTest
{
public float t;
public float p;
public bool a;
public int i;
You can’t perform that action at this time.