View sort.xslt
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*">
<xsl:sort select="name()"/>
</xsl:apply-templates>
View objects.xml
<Object name="unsc_bldg_barracks_01" id="0" dbid="137">
<Command Type="TrainSquad" Position="1">unsc_inf_marine_01</Command>
<Command Type="TrainSquad" Position="1">unsc_inf_odst_01</Command>
<Command Type="TrainSquad" Position="2">unsc_inf_flameMarine_01</Command>
<Command Type="TrainSquad" Position="3">unsc_inf_spartan_01</Command>
<Command Type="Research" Position="7">unsc_marine_upgrade1</Command>
<Command Type="Research" Position="7">unsc_marine_upgrade2</Command>
<Command Type="Research" Position="7">unsc_marine_upgrade3</Command>
<Command Type="Research" Position="7">unsc_odst_upgrade1</Command>
View After.cs
// #NOTE: be mindful of how large T actually is and whether or not your runtime does or doesn't
// optimize passing large structs by reference instead of copying bits to other parts of the stack
public static T Read<T>(this BinaryReader reader, T item = default(T))
where T : IStreamSerializable, new()
{
if (item == null) // value types are never null, so this helps us avoid heap allocations
item = new T();
item.Load(reader);
return item;
View EnumAndCustomComparer.cs
// #IMPL: If you change the underlying type, update ProtoSomething.ComparerImpl too!
public enum HardCodedThing : byte
{
Some,
Thing,
Something,
Darkside
cMaxCount,
};
View ProfilerWindowInterop.cs
// Use at your own risk.
// Should work with any Unity Editor since at least 4.6
// These macros make it so changes aren't actually committed to the EditorPrefs. Instead, changes are Debug.Log'd
//#define VIEW_PREFS_READ_ONLY
#define CHART_PREFS_READ_ONLY
// You'll need this defined, unless you have my BitVector32 from https://bitbucket.org/KornnerStudios/ksoft
#define USE_SYSTEM_BITVECTOR
using System;
View SeeingSharpCpp_Statics.cs
using System;
namespace SharpCpp
{
public struct ValueTypeWithCctor
{
public int Value;
// Comment this out and the CPP code for operator+ won't have a prologue nor invoke IL2CPP_RUNTIME_CLASS_INIT.
// This causes a hidden cctor to be generated by the compiler.
View SeeingSharpCpp_Il2CppSetOption.cpp
extern TypeInfo* Int32U5BU5D_t1872284309_0_il2cpp_TypeInfo_var;
// NOTE: 'Int32U5BU5D_t1872284309_0' is to IL2CPP as 'int[]' is to C#
// System.Int32 SharpCpp.SharpCode::Il2CppSetOption_ChecksEnabled()
extern "C" int32_t SharpCode_Il2CppSetOption_ChecksEnabled_m_1098767581_0 (Object_t * __this /* static, unused */, const MethodInfo* method)
{
Int32U5BU5D_t1872284309_0* V_0 = {0};
{
//var array = new int[1];
View GetDelegateForFunctionPointer.cs
using System;
using System.Linq;
using Contracts = System.Diagnostics.Contracts;
using Contract = System.Diagnostics.Contracts.Contract;
using Reflect = System.Reflection;
using Interop = System.Runtime.InteropServices;
namespace KSoft.Reflection
{
public static partial class Util