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 Windows() | |
| { | |
| CheckDir(@"Scratch\WinRT"); | |
| PlayerSettings.Metro.packageVersion = new Version(_versionNumber); | |
| EditorUserBuildSettings.metroBuildType = MetroBuildType.VisualStudioCSharp; | |
| EditorUserBuildSettings.metroSDK = MetroSDK.UniversalSDK81; | |
| BuildPipeline.BuildPlayer(GetScenes(), "Scratch/WinRT", BuildTarget.MetroPlayer, BuildOptions.None); | |
| } |
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
| let windowsSolution = "Scratch/WinRT/YourGame.sln" | |
| let parameters = [ | |
| ("Configuration", "Release") | |
| ("AppxBundle", "Auto") | |
| ("AppxPackage", "True") | |
| ("AppxPackageIsForStore", "True") | |
| ("AppxPackageDir", "../../../../build/") | |
| ("AppxPackageDirWasSpecified", "True") | |
| ("AppVersion", versionNumber) | |
| ] |
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
| Target "test" (fun () -> | |
| Unity "-executeMethod UnityTest.Batch.RunUnitTests -resultFilePath TestResults.xml" | |
| ) |
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
| NSObject *object = [[NSObject alloc] init]; | |
| //Do stuff with the object | |
| [object makeItRain: @"benjamins"]; | |
| //Cleanup your memory | |
| [object release]; |
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
| var obj = new NSObject(); | |
| obj.MakeItRain("benjamins"); | |
| obj.Dispose(); |
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 *class = objc_getClass("NSObject"); | |
| SEL alloc = sel_registerName("alloc"); | |
| SEL init = sel_registerName("init"); | |
| id *object = objc_msgSend(objc_msgSend(class, alloc), init); | |
| //Ok, now make it rain | |
| SEL makeItRain = sel_registerName("makeItRain:"); | |
| objc_msgSend(object, makeItRain, "benjamins"); | |
| SEL release = sel_registerName("release"); |
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 static class Messaging | |
| { | |
| [DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")] | |
| public static extern IntPtr Intptr_objc_msgSend(IntPtr receiver, IntPtr selector); | |
| [DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")] | |
| public static extern IntPtr IntPtr_objc_msgSend_byte(IntPtr receiver, IntPtr selector, byte arg1); | |
| [DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")] | |
| public static extern IntPtr IntPtr_objc_msgSend_Double(IntPtr receiver, IntPtr selector, double arg1); |
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
| IntPtr classHandle = Class.GetHandle("NSObject"); | |
| var selector = new Selector("alloc"); |
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 NSObject | |
| { | |
| private IntPtr _handle; | |
| public NSObject() | |
| { | |
| IntPtr classHandle = Class.GetHandle("NSObject"); | |
| var alloc = new Selector("alloc"); | |
| var init = new Selector("init"); | |
| _handle = Messaging.IntPtr_objc_msgSend(classHandle, alloc.Handle); |
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
| #r @"packages/FAKE.4.3.7/tools/FakeLib.dll" | |
| open Fake | |
| Target "android" (fun () -> | |
| Unity "-executeMethod BuildScript.Android" | |
| ) | |
| RunTarget() |