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.Generic; | |
using System.Diagnostics; | |
using System.Text; | |
namespace Unity.Il2CPP.Builders | |
{ | |
public class SimpleExecutable : BuiltProgram | |
{ | |
private readonly string _path; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
class Experiment | |
{ | |
//ErrorsFor takes a hayStack, a bunch of needles, and is supposed to invoke errorMessage generator for everything | |
//in the haystack that matches a certain needle. As an excersice, i've been trying out all the different ways | |
//to write it, and evaluate for clarity, conciceness, readability by others, readability by me. | |
// |
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 ICSharpCode.Decompiler.Ast.Transforms; | |
using cil2as.Configuration; | |
using cil2as.Decompiler.Transforms; | |
using cil2as.Decompiler.Transforms.Generics; | |
namespace cil2as.Decompiler | |
{ | |
class ActionScriptTransformationPipelineProvider : ITransformationPipelineProvider | |
{ | |
private readonly ServiceProvider _serviceProvider; |
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
//cl.exe main.cpp errors out witha link error, because booya() is an unresolved symbol. | |
//it is not actually used by the program however. is there a trick to make it only complain about unresolved symbols | |
//that actually end up being needed to run the program? | |
extern void booya(); | |
void NotActuallyUsed() | |
{ | |
booya(); | |
} |
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
static void | |
thread_end (MonoProfiler *prof, gsize tid) | |
{ | |
MonoInternalThread *thread; | |
DebuggerTlsData *tls = NULL; | |
mono_loader_lock (); | |
thread = mono_g_hash_table_lookup (tid_to_thread, (gpointer)tid); | |
if (thread) { | |
tls = mono_g_hash_table_lookup (thread_to_tls, thread); |
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; | |
using System.Collections.Generic; | |
class Camera {} | |
struct UnityList<T> | |
{ | |
T[] _cameras; | |
public MyEnumerator GetEnumerator() |
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
public class SerializationCallbackInCustomStruct : RuntimeTest | |
{ | |
public class SerializationCallbackInCustomStructScript : MonoBehaviour | |
{ | |
[Serializable] | |
public struct Custom : INotifyOnSerialization | |
{ | |
public int myint; | |
public int myint2; | |
public int myint3; |
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; | |
using NUnit.Framework; | |
using Unity.RuntimeTests.Framework; | |
using UnityEngine; | |
using RuntimePlatform = UnityEngine.Common.Enums.RuntimePlatform; | |
namespace Unity.RuntimeTests.SerializationTests.Callback | |
{ | |
[TestFixture] | |
[ExcludePlatform(RuntimePlatform.FlashPlayer, ExcludePlatformAttribute.ExclusionReason.NotSupported, "this feature was introduced after announcing flash EOL")] |
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
[DataVersion(2)] | |
public MyClass : MonoBehaviour | |
{ | |
public float m_myFloatThatUsedToBeAnInt; | |
} | |
#if UNITY_EDITOR | |
static class DataUpdater | |
{ | |
[DataUpdaterFor(typeof(MyClass))] |
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
public MyClass : MonoBehaviour, IWantToHandleDeserializationOfOldDataMyself | |
{ | |
public float m_myFloatThatUsedToBeAnInt; | |
#if UNITY_EDITOR | |
static void DeserializeOldData(SerializedObject oldData, SerializedObject newData) | |
{ | |
} | |
#endif | |
} |