This file contains 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
// Adjust dSYM generation | |
var xcodeProjectPath = Path.Combine(xcodeProjectDir, "Unity-iPhone.xcodeproj"); | |
var pbxPath = Path.Combine(xcodeProjectPath, "project.pbxproj"); | |
var sb = new System.Text.StringBuilder(); | |
var xcodeProjectLines = File.ReadAllLines(pbxPath); | |
foreach (var line in xcodeProjectLines) | |
{ | |
// Remove from OTHER_LDFLAGS |
This file contains 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 UnityEngine; | |
namespace Framework | |
{ | |
/// <summary> | |
/// Simple singleton, automatically find a instance and caches it | |
/// Implementors should make all public methods and properties as static and access Instance | |
/// </summary> | |
public abstract class Singleton<T> : MonoBehaviour where T: MonoBehaviour | |
{ |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.IO; | |
public class CSharpProjectProcessor : AssetPostprocessor | |
{ | |
[MenuItem("Assets/Clean MonoDevelop Files")] | |
static void CleanMonoDevelopFiles() | |
{ |
This file contains 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
// Source: https://forum.unity.com/threads/binary-protocol-specification.417831/ | |
//all 16 and 32 bit data are network ordered | |
//message length occupy 1 byte length if first bit == 0 or 2 bytes if it equal 1: | |
int SetLength(char* buffer, uint16_t messageLength) | |
{ | |
int messageLengthSize = (messageLength > 0x7F) ? 2 : 1; | |
if (messageLengthSize == 1) | |
{ | |
*buffer = (uint8_t)messageLength; |
This file contains 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 UnityEditor.Build.Pipeline; | |
using UnityEditor.Build.Pipeline.Injector; | |
using UnityEditor.Build.Pipeline.Interfaces; | |
public class GenerateLinkXml : IBuildTask | |
{ | |
public static readonly string LinkXmlFilename = "link.xml"; | |
public int Version { get { return 1; } } |