├── .gitignore ├── Config ├── DefaultEditor.ini ├── DefaultEditorPerProjectUserSettings.ini ├── DefaultEngine.ini ├── DefaultGame.ini └── DefaultInput.ini ├── Content ├── ChoiceButton.uasset ├── FirstPerson │ ├── Animations │ │ ├── FirstPersonFire_Montage.uasset │ │ ├── FirstPerson_AnimBP.uasset │ │ ├── FirstPerson_Fire.uasset │ │ ├── FirstPerson_Idle.uasset │ │ ├── FirstPerson_JumpEnd.uasset │ │ ├── FirstPerson_JumpLoop.uasset │ │ ├── FirstPerson_JumpStart.uasset │ │ └── FirstPerson_Run.uasset │ ├── Audio │ │ └── FirstPersonTemplateWeaponFire02.uasset │ ├── Character │ │ ├── Materials │ │ │ ├── M_UE4Man_Body.uasset │ │ │ └── MaterialLayers │ │ │ │ ├── ML_GlossyBlack_Latex_UE4.uasset │ │ │ │ ├── ML_Plastic_Shiny_Beige.uasset │ │ │ │ ├── ML_Plastic_Shiny_Beige_LOGO.uasset │ │ │ │ ├── ML_SoftMetal_UE4.uasset │ │ │ │ ├── T_ML_Aluminum01.uasset │ │ │ │ ├── T_ML_Aluminum01_N.uasset │ │ │ │ ├── T_ML_Rubber_Blue_01_D.uasset │ │ │ │ └── T_ML_Rubber_Blue_01_N.uasset │ │ ├── Mesh │ │ │ ├── FirstPersonAnimBlueprint_Copy.uasset │ │ │ ├── SK_Mannequin_Arms.uasset │ │ │ ├── SK_Mannequin_Arms_PhysicsAsset.uasset │ │ │ └── SK_Mannequin_Arms_Skeleton.uasset │ │ └── Textures │ │ │ ├── UE4_LOGO_CARD.uasset │ │ │ ├── UE4_Mannequin_MAT_MASKA.uasset │ │ │ └── UE4_Mannequin__normals.uasset │ ├── FPWeapon │ │ ├── Materials │ │ │ ├── M_FPGun.uasset │ │ │ └── MaterialLayers │ │ │ │ ├── ML_GlossyBlack_Latex_UE4.uasset │ │ │ │ ├── ML_Plastic_Shiny_Beige.uasset │ │ │ │ ├── ML_Plastic_Shiny_Beige_LOGO.uasset │ │ │ │ ├── ML_Screen.uasset │ │ │ │ ├── ML_SoftMetal_UE4.uasset │ │ │ │ ├── T_ML_Aluminum01.uasset │ │ │ │ ├── T_ML_Aluminum01_N.uasset │ │ │ │ ├── T_ML_FineRubber.uasset │ │ │ │ ├── T_ML_Rubber_Blue_01_D.uasset │ │ │ │ └── T_ML_Rubber_Blue_01_N.uasset │ │ ├── Mesh │ │ │ ├── SK_FPGun.uasset │ │ │ ├── SK_FPGun_PhysicsAsset.uasset │ │ │ └── SK_FPGun_Skeleton.uasset │ │ └── Textures │ │ │ ├── T_FPGun_M.uasset │ │ │ └── T_FPGun_N.uasset │ ├── Meshes │ │ ├── BaseMaterial.uasset │ │ ├── CubeMaterialOverride.uasset │ │ ├── FirstPersonProjectileMaterial.uasset │ │ └── FirstPersonProjectileMesh.uasset │ └── Textures │ │ └── FirstPersonCrosshair.uasset ├── FirstPersonBP │ ├── Blueprints │ │ ├── FirstPersonCharacter.uasset │ │ ├── FirstPersonGameMode.uasset │ │ ├── FirstPersonHUD.uasset │ │ └── FirstPersonProjectile.uasset │ ├── FirstPersonOverview.uasset │ └── Maps │ │ ├── FirstPersonExampleMap.umap │ │ └── FirstPersonExampleMap_BuiltData.uasset ├── Geometry │ └── Meshes │ │ ├── 1M_Cube.uasset │ │ ├── 1M_Cube_Chamfer.uasset │ │ ├── CubeMaterial.uasset │ │ └── TemplateFloor.uasset ├── Ink3DStory.uasset ├── MonsieurFog.ink ├── MonsieurFog.uasset ├── TheIntercept.ink ├── TheIntercept.uasset └── UISceneActor.uasset ├── Documentation ├── Example.png └── NewStoryNode.png ├── Plugins └── UnrealInk │ ├── Config │ └── FilterPlugin.ini │ ├── LICENSE.txt │ ├── Resources │ └── Icon128.png │ ├── Source │ ├── Ink │ │ ├── Ink.Build.cs │ │ ├── Private │ │ │ ├── Choice.cpp │ │ │ ├── Ink.cpp │ │ │ ├── InkCompiler.cpp │ │ │ ├── InkVar.cpp │ │ │ ├── MonoBaseClass.cpp │ │ │ ├── MonoBaseClass.h │ │ │ ├── Story.cpp │ │ │ ├── StoryAsset.cpp │ │ │ ├── StoryState.cpp │ │ │ └── VariableState.cpp │ │ └── Public │ │ │ ├── Choice.h │ │ │ ├── Ink.h │ │ │ ├── InkCompiler.h │ │ │ ├── InkVar.h │ │ │ ├── Story.h │ │ │ ├── StoryAsset.h │ │ │ ├── StoryState.h │ │ │ └── VariablesState.h │ ├── InkEditor │ │ ├── InkEditor.Build.cs │ │ ├── Private │ │ │ ├── InkEditor.cpp │ │ │ ├── StoryAssetFactory.cpp │ │ │ └── StoryAssetFactory.h │ │ └── Public │ │ │ └── InkEditor.h │ └── ThirdParty │ │ └── InkGlue │ │ ├── InkGlue.sln │ │ ├── InkGlue │ │ ├── GlueChoice.cs │ │ ├── GlueCompiler.cs │ │ ├── GlueStory.cs │ │ ├── GlueStoryState.cs │ │ ├── GlueVariablesState.cs │ │ └── InkGlue.csproj │ │ └── InkGlueTest │ │ ├── InkGlueTest.csproj │ │ ├── Program.cs │ │ └── Properties │ │ └── launchSettings.json │ ├── ThirdParty │ ├── Ink │ │ ├── InkGlue.deps.json │ │ ├── InkGlue.dll │ │ ├── ink-engine-runtime.dll │ │ └── ink_compiler.dll │ └── Mono │ │ ├── assemblies │ │ ├── System.Collections.dll │ │ ├── System.Core.dll │ │ ├── System.Diagnostics.Debug.dll │ │ ├── System.Globalization.dll │ │ ├── System.IO.FileSystem.dll │ │ ├── System.Linq.dll │ │ ├── System.Runtime.Extensions.dll │ │ ├── System.Runtime.InteropServices.dll │ │ ├── System.Runtime.dll │ │ ├── System.Threading.dll │ │ ├── System.dll │ │ └── mscorlib.dll │ │ ├── include │ │ └── mono │ │ │ ├── cil │ │ │ └── opcode.def │ │ │ ├── jit │ │ │ └── jit.h │ │ │ ├── metadata │ │ │ ├── appdomain.h │ │ │ ├── assembly.h │ │ │ ├── attrdefs.h │ │ │ ├── blob.h │ │ │ ├── class.h │ │ │ ├── debug-helpers.h │ │ │ ├── debug-mono-symfile.h │ │ │ ├── environment.h │ │ │ ├── exception.h │ │ │ ├── image.h │ │ │ ├── loader.h │ │ │ ├── metadata.h │ │ │ ├── mono-config.h │ │ │ ├── mono-debug.h │ │ │ ├── mono-gc.h │ │ │ ├── object.h │ │ │ ├── opcodes.h │ │ │ ├── profiler.h │ │ │ ├── reflection.h │ │ │ ├── row-indexes.h │ │ │ ├── sgen-bridge.h │ │ │ ├── threads.h │ │ │ ├── tokentype.h │ │ │ └── verify.h │ │ │ └── utils │ │ │ ├── mono-counters.h │ │ │ ├── mono-dl-fallback.h │ │ │ ├── mono-error.h │ │ │ ├── mono-logger.h │ │ │ └── mono-publib.h │ │ └── lib │ │ ├── Mac │ │ └── libmonosgen-2.0.dylib │ │ ├── Win32 │ │ ├── mono-2.0-sgen.dll │ │ └── mono-2.0-sgen.lib │ │ └── Win64 │ │ ├── mono-2.0-sgen.dll │ │ └── mono-2.0-sgen.lib │ └── UnrealInk.uplugin ├── README.md ├── Source ├── UnrealInkExample.Target.cs ├── UnrealInkExample │ ├── DummyClass.cpp │ ├── DummyClass.h │ ├── UnrealInkExample.Build.cs │ ├── UnrealInkExample.cpp │ └── UnrealInkExample.h └── UnrealInkExampleEditor.Target.cs ├── UnrealInkExample.sln └── UnrealInkExample.uproject /.gitignore: -------------------------------------------------------------------------------- 1 | Intermediate/ 2 | Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/bin/ 3 | Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/obj/ 4 | Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlueTest/bin/ 5 | Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlueTest/obj/ 6 | ExampleProject/Saved/ 7 | ExampleProject/DerivedDataCache/ 8 | *.pdb 9 | Binaries/ 10 | Source/ThirdParty/InkGlue/.vs/ 11 | .vs/ 12 | Saved/ 13 | -------------------------------------------------------------------------------- /Config/DefaultEditor.ini: -------------------------------------------------------------------------------- 1 | [UnrealEd.SimpleMap] 2 | SimpleMapName=/Game/FirstPersonBP/Maps/FirstPersonExampleMap 3 | 4 | [EditoronlyBP] 5 | bAllowClassAndBlueprintPinMatching=true 6 | bReplaceBlueprintWithClass= true 7 | bDontLoadBlueprintOutsideEditor= true 8 | bBlueprintIsNotBlueprintType= true -------------------------------------------------------------------------------- /Config/DefaultEditorPerProjectUserSettings.ini: -------------------------------------------------------------------------------- 1 | [ContentBrowser] 2 | ContentBrowserTab1.SelectedPaths=/Game/FirstPersonBP -------------------------------------------------------------------------------- /Config/DefaultEngine.ini: -------------------------------------------------------------------------------- 1 | [/Script/Engine.CollisionProfile] 2 | +Profiles=(Name="Projectile",CollisionEnabled=QueryOnly,ObjectTypeName="Projectile",CustomResponses=,HelpMessage="Preset for projectiles",bCanModify=True) 3 | +DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,Name="Projectile",DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False) 4 | +EditProfiles=(Name="Trigger",CustomResponses=((Channel=Projectile, Response=ECR_Ignore))) 5 | 6 | [/Script/EngineSettings.GameMapsSettings] 7 | EditorStartupMap=/Game/FirstPersonBP/Maps/FirstPersonExampleMap 8 | LocalMapOptions= 9 | TransitionMap= 10 | bUseSplitscreen=True 11 | TwoPlayerSplitscreenLayout=Horizontal 12 | ThreePlayerSplitscreenLayout=FavorTop 13 | GameInstanceClass=/Script/Engine.GameInstance 14 | GameDefaultMap=/Game/FirstPersonBP/Maps/FirstPersonExampleMap 15 | ServerDefaultMap=/Engine/Maps/Entry 16 | GlobalDefaultGameMode=/Game/FirstPersonBP/Blueprints/FirstPersonGameMode.FirstPersonGameMode_C 17 | GlobalDefaultServerGameMode=None 18 | 19 | [/Script/IOSRuntimeSettings.IOSRuntimeSettings] 20 | MinimumiOSVersion=IOS_11 21 | 22 | 23 | [/Script/HardwareTargeting.HardwareTargetingSettings] 24 | TargetedHardwareClass=Desktop 25 | AppliedTargetedHardwareClass=Desktop 26 | DefaultGraphicsPerformance=Maximum 27 | AppliedDefaultGraphicsPerformance=Maximum 28 | 29 | [/Script/Engine.Engine] 30 | +ActiveGameNameRedirects=(OldGameName="TP_FirstPersonBP",NewGameName="/Script/UnrealInkExample") 31 | +ActiveGameNameRedirects=(OldGameName="/Script/TP_FirstPersonBP",NewGameName="/Script/UnrealInkExample") 32 | 33 | -------------------------------------------------------------------------------- /Config/DefaultGame.ini: -------------------------------------------------------------------------------- 1 | [/Script/EngineSettings.GeneralProjectSettings] 2 | ProjectID=3ACB118B4016B182D2DCD18DA01710D2 3 | ProjectName=First Person BP Game Template 4 | -------------------------------------------------------------------------------- /Content/ChoiceButton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/ChoiceButton.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPersonFire_Montage.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPersonFire_Montage.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_AnimBP.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_AnimBP.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_Fire.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_Fire.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_Idle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_Idle.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_JumpEnd.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_JumpEnd.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_JumpLoop.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_JumpLoop.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_JumpStart.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_JumpStart.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Animations/FirstPerson_Run.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Animations/FirstPerson_Run.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Audio/FirstPersonTemplateWeaponFire02.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Audio/FirstPersonTemplateWeaponFire02.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/M_UE4Man_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/M_UE4Man_Body.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Mesh/FirstPersonAnimBlueprint_Copy.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Mesh/FirstPersonAnimBlueprint_Copy.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms_Skeleton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Mesh/SK_Mannequin_Arms_Skeleton.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Textures/UE4_LOGO_CARD.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Textures/UE4_LOGO_CARD.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Textures/UE4_Mannequin_MAT_MASKA.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Textures/UE4_Mannequin_MAT_MASKA.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Character/Textures/UE4_Mannequin__normals.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Character/Textures/UE4_Mannequin__normals.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/M_FPGun.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/M_FPGun.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Screen.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_Screen.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Aluminum01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Aluminum01.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_FineRubber.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_FineRubber.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Mesh/SK_FPGun.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Mesh/SK_FPGun.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Mesh/SK_FPGun_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Mesh/SK_FPGun_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Mesh/SK_FPGun_Skeleton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Mesh/SK_FPGun_Skeleton.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Textures/T_FPGun_M.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Textures/T_FPGun_M.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/FPWeapon/Textures/T_FPGun_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/FPWeapon/Textures/T_FPGun_N.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Meshes/BaseMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Meshes/BaseMaterial.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Meshes/CubeMaterialOverride.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Meshes/CubeMaterialOverride.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Meshes/FirstPersonProjectileMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Meshes/FirstPersonProjectileMaterial.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Meshes/FirstPersonProjectileMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Meshes/FirstPersonProjectileMesh.uasset -------------------------------------------------------------------------------- /Content/FirstPerson/Textures/FirstPersonCrosshair.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPerson/Textures/FirstPersonCrosshair.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/Blueprints/FirstPersonCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Blueprints/FirstPersonCharacter.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/Blueprints/FirstPersonGameMode.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Blueprints/FirstPersonGameMode.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/Blueprints/FirstPersonHUD.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Blueprints/FirstPersonHUD.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/Blueprints/FirstPersonProjectile.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Blueprints/FirstPersonProjectile.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/FirstPersonOverview.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/FirstPersonOverview.uasset -------------------------------------------------------------------------------- /Content/FirstPersonBP/Maps/FirstPersonExampleMap.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Maps/FirstPersonExampleMap.umap -------------------------------------------------------------------------------- /Content/FirstPersonBP/Maps/FirstPersonExampleMap_BuiltData.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/FirstPersonBP/Maps/FirstPersonExampleMap_BuiltData.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/Geometry/Meshes/1M_Cube.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube_Chamfer.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/Geometry/Meshes/1M_Cube_Chamfer.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/CubeMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/Geometry/Meshes/CubeMaterial.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/TemplateFloor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/Geometry/Meshes/TemplateFloor.uasset -------------------------------------------------------------------------------- /Content/Ink3DStory.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/Ink3DStory.uasset -------------------------------------------------------------------------------- /Content/MonsieurFog.ink: -------------------------------------------------------------------------------- 1 | # this is a global tags 2 | # another tag 3 | 4 | VAR fogs_string_mood = "good" 5 | VAR fogs_current_mood = 1 6 | 7 | - I looked at Monsieur Fogg 8 | * ... and I could contain myself no longer. 9 | 'What is the purpose of our journey, Monsieur?' 10 | ~ fogs_string_mood = "excellent" 11 | ~ fogs_current_mood = 2 12 | 'A wager,' he replied. 13 | * * 'A wager!'[] I returned. 14 | He nodded. 15 | * * * 'But surely that is foolishness!' 16 | * * * 'A most serious matter then!' 17 | - - - He nodded again. 18 | TODO: Write this properly 19 | * * * 'But can we win?' 20 | 'That is what we will endeavour to find out,' he answered. 21 | ~ fogs_string_mood = "good" 22 | ~ fogs_current_mood = 1 23 | * * * 'A modest wager, I trust?' 24 | 'Twenty thousand pounds,' he replied, quite flatly. 25 | * * * I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <> 26 | * * 'Ah[.'],' I replied, uncertain what I thought. 27 | - - After that, <> 28 | * ... but I said nothing[] and <> 29 | - we passed the day in silence 30 | - -> END 31 | 32 | === function say_yes_to_everything === 33 | ~ return true 34 | 35 | === function lerp(a, b, k) === 36 | ~ return ((b - a) * k) + a -------------------------------------------------------------------------------- /Content/MonsieurFog.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/MonsieurFog.uasset -------------------------------------------------------------------------------- /Content/TheIntercept.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/TheIntercept.uasset -------------------------------------------------------------------------------- /Content/UISceneActor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Content/UISceneActor.uasset -------------------------------------------------------------------------------- /Documentation/Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Documentation/Example.png -------------------------------------------------------------------------------- /Documentation/NewStoryNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Documentation/NewStoryNode.png -------------------------------------------------------------------------------- /Plugins/UnrealInk/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | ; Examples: 6 | ; /README.txt 7 | ; /Extras/... 8 | ; /Binaries/ThirdParty/*.dll 9 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 David Colson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/Resources/Icon128.png -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Ink.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | using System; 6 | 7 | public class Ink : ModuleRules 8 | { 9 | // Module path is into the Ink source module, that is UnrealInk/Source/Ink 10 | private string ModulePath 11 | { 12 | get { return ModuleDirectory; } 13 | } 14 | 15 | private string ThirdPartyPath 16 | { 17 | get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); } 18 | } 19 | 20 | private string BinariesPath 21 | { 22 | get { return Path.GetFullPath(Path.Combine(ModulePath, "../../Binaries/")); } 23 | } 24 | 25 | private string LibraryPath 26 | { 27 | get { return Path.GetFullPath(Path.Combine(ThirdPartyPath, "Mono", "lib")); } 28 | } 29 | 30 | public Ink(ReadOnlyTargetRules Target) : base(Target) 31 | { 32 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 33 | 34 | OptimizeCode = CodeOptimization.Never; 35 | 36 | PublicIncludePaths.AddRange( 37 | new string[] { 38 | Path.Combine(ModulePath, "Public") 39 | // ... add public include paths required here ... 40 | } 41 | ); 42 | 43 | PrivateIncludePaths.AddRange( 44 | new string[] { 45 | Path.Combine(ModulePath, "Private"), 46 | Path.Combine(ThirdPartyPath, "Mono", "include") 47 | } 48 | ); 49 | 50 | 51 | PublicDependencyModuleNames.AddRange( 52 | new string[] 53 | { 54 | "Core", 55 | "Projects", 56 | "CoreUObject", 57 | "Engine", 58 | // ... add other public dependencies that you statically link with here ... 59 | } 60 | ); 61 | 62 | string pluginDirectory = ModuleDirectory + "/../.."; 63 | 64 | AddMonoRuntime(Target, pluginDirectory); 65 | 66 | 67 | // Copy dlls and assemblies to output directory 68 | // -------------------------------------------- 69 | 70 | string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32"; 71 | if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32) 72 | { 73 | RuntimeDependencies.Add("$(TargetOutputDir)/mono-2.0-sgen.dll", Path.Combine(pluginDirectory, "ThirdParty/Mono/lib", PlatformString, "mono-2.0-sgen.dll")); 74 | } 75 | else if (Target.Platform == UnrealTargetPlatform.Mac) 76 | { 77 | RuntimeDependencies.Add("$(TargetOutputDir)/libmonosgen-2.0.dylib", Path.Combine(pluginDirectory, "ThirdParty/Mono/lib", PlatformString, "libmonosgen-2.0.dylib")); 78 | } 79 | 80 | // Mono Assemblies 81 | RuntimeDependencies.Add("$(TargetOutputDir)/...", Path.Combine(pluginDirectory, "ThirdParty/Mono/Assemblies/...")); 82 | 83 | // Ink Assemblies 84 | RuntimeDependencies.Add("$(TargetOutputDir)/ink_compiler.dll", Path.Combine(pluginDirectory, "ThirdParty/Ink/ink_compiler.dll")); 85 | RuntimeDependencies.Add("$(TargetOutputDir)/ink-engine-runtime.dll", Path.Combine(pluginDirectory, "ThirdParty/Ink/ink-engine-runtime.dll")); 86 | RuntimeDependencies.Add("$(TargetOutputDir)/InkGlue.dll", Path.Combine(pluginDirectory, "ThirdParty/Ink/InkGlue.dll")); 87 | 88 | PrecompileForTargets = PrecompileTargetsType.Any; 89 | } 90 | 91 | void AddMonoRuntime(ReadOnlyTargetRules Target, string MonoUEPluginDirectory) 92 | { 93 | string MonoLibPath = MonoUEPluginDirectory + "/ThirdParty/Mono/lib/" + Target.Platform; 94 | 95 | if (Target.Platform == UnrealTargetPlatform.Win64 96 | || Target.Platform == UnrealTargetPlatform.Win32) 97 | { 98 | string LibraryName = "mono-2.0-sgen"; 99 | PublicAdditionalLibraries.Add(Path.Combine(MonoLibPath, LibraryName + ".lib")); 100 | PublicDelayLoadDLLs.Add(LibraryName + ".dll"); 101 | } 102 | else if (Target.Platform == UnrealTargetPlatform.Mac) 103 | { 104 | string LibraryName = "libmonosgen-2.0"; 105 | PublicAdditionalLibraries.Add("iconv"); 106 | PublicDelayLoadDLLs.Add(LibraryName + ".dylib"); 107 | } 108 | else 109 | { 110 | throw new BuildException("Mono not supported on platform '{0}'", Target.Platform); 111 | } 112 | 113 | PublicDefinitions.Add("MONO_IS_DYNAMIC_LIB=1"); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/Choice.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "Choice.h" 4 | 5 | #include "Ink.h" 6 | 7 | #include 8 | 9 | 10 | //////////////////////////////////////////////////////// 11 | UChoice::UChoice() 12 | { 13 | 14 | } 15 | 16 | //////////////////////////////////////////////////////// 17 | UChoice* UChoice::NewChoice(MonoObject* MonoChoice) 18 | { 19 | UChoice* NewChoice = NewObject(); 20 | NewChoice->NewFromInstance(MonoChoice); 21 | return NewChoice; 22 | } 23 | 24 | //////////////////////////////////////////////////////// 25 | FString UChoice::Text() 26 | { 27 | return MonoInvoke("Text", NULL); 28 | } 29 | 30 | //////////////////////////////////////////////////////// 31 | FString UChoice::PathStringOnChoice() 32 | { 33 | return MonoInvoke("PathStringOnChoice", NULL); 34 | } 35 | 36 | //////////////////////////////////////////////////////// 37 | FString UChoice::SourcePath() 38 | { 39 | return MonoInvoke("SourcePath", NULL); 40 | } 41 | 42 | //////////////////////////////////////////////////////// 43 | int UChoice::Index() 44 | { 45 | return MonoInvoke("Index", NULL); 46 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/Ink.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "Ink.h" 4 | #include "Modules/ModuleInterface.h" 5 | #include "Interfaces/IPluginManager.h" 6 | #include "HAL/PlatformFilemanager.h" 7 | #include "HAL/FileManager.h" 8 | #include "Misc/Paths.h" 9 | #include "Misc/App.h" 10 | 11 | #include "Story.h" 12 | #include "StoryState.h" 13 | #include "Choice.h" 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #define LOCTEXT_NAMESPACE "FInkModule" 20 | 21 | DEFINE_LOG_CATEGORY(LogInk) 22 | 23 | static TArray MonoPreloadSearchPaths; 24 | 25 | //////////////////////////////////////////////////////// 26 | static MonoAssembly* assembly_preload_hook(MonoAssemblyName *aname, char **assemblies_path, void* user_data) 27 | { 28 | IFileManager& FileManager = IFileManager::Get(); 29 | 30 | const char *name = mono_assembly_name_get_name(aname); 31 | const char *culture = mono_assembly_name_get_culture(aname); 32 | auto AsmName = FString(ANSI_TO_TCHAR(name)); 33 | auto AsmCulture = FString(ANSI_TO_TCHAR(culture)); 34 | 35 | if (!AsmName.EndsWith(TEXT(".dll"), ESearchCase::IgnoreCase)) 36 | { 37 | AsmName = AsmName + TEXT(".dll"); 38 | } 39 | 40 | FString AttemptedSearchPaths; 41 | 42 | for (FString searchPath : MonoPreloadSearchPaths) 43 | { 44 | // Determine if file exists in the search path 45 | auto AsmPath = FPaths::Combine(*searchPath, *AsmName); 46 | if (!FPaths::FileExists(AsmPath)) 47 | { 48 | AsmPath = FPaths::Combine(*searchPath, *AsmCulture, *AsmName); 49 | if (!FPaths::FileExists(AsmPath)) 50 | { 51 | FString AbsoluteAssemblyPath = FileManager.ConvertToAbsolutePathForExternalAppForRead(*AsmPath); 52 | AttemptedSearchPaths.Appendf(TEXT("%s\n"), *AbsoluteAssemblyPath); 53 | continue; 54 | } 55 | } 56 | 57 | FString AbsoluteAssemblyPath = FileManager.ConvertToAbsolutePathForExternalAppForRead(*AsmPath); 58 | 59 | // Run mono_assmebly_open 60 | // Return success 61 | MonoImageOpenStatus status; 62 | MonoAssembly *loaded_asm = mono_assembly_open(TCHAR_TO_UTF8(*AbsoluteAssemblyPath), &status); 63 | if (loaded_asm) 64 | { 65 | UE_LOG(LogInk, Log, TEXT("Loaded assembly from path '%s'."), *AbsoluteAssemblyPath); 66 | return loaded_asm; 67 | } 68 | } 69 | 70 | UE_LOG(LogInk, Fatal, TEXT("Failed to load assembly '%s' searched in the following folders: \n %s"), *AsmName, *AttemptedSearchPaths); 71 | 72 | return nullptr; 73 | } 74 | 75 | //////////////////////////////////////////////////////// 76 | void FInkModule::StartupModule() 77 | { 78 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 79 | 80 | // Get the base directory of this plugin 81 | FString BaseDir = IPluginManager::Get().FindPlugin("UnrealInk")->GetBaseDir(); 82 | 83 | // Add on the relative location of the third party dll and load it 84 | FString LibraryPath; 85 | #if PLATFORM_WINDOWS 86 | LibraryPath = FPaths::Combine(*BaseDir, TEXT("ThirdParty/Mono/lib/Win64/mono-2.0-sgen.dll")); 87 | #elif PLATFORM_MAC 88 | LibraryPath = FPaths::Combine(*BaseDir, TEXT("Binaries/ThirdParty/mono/mono-2.0-sgen.dylib")); 89 | #endif // PLATFORM_WINDOWS 90 | 91 | MonoLibraryHandle = FPlatformProcess::GetDllHandle(*LibraryPath); 92 | 93 | 94 | // Load and init Mono and Ink 95 | ////////////////////////////////////////////////////////////////// 96 | ////////////////////////////////////////////////////////////////// 97 | 98 | // TODO: For packaged builds, this directory should be the engine binaries directory, and the binaries need to be copied in 99 | 100 | FString MonoSearchPath = FPaths::EnginePluginsDir() + "UnrealInk/ThirdParty/Mono/Assemblies/"; 101 | MonoPreloadSearchPaths.Add(MonoSearchPath); 102 | MonoSearchPath = FPaths::ProjectPluginsDir() + "UnrealInk/ThirdParty/Mono/Assemblies/"; 103 | MonoPreloadSearchPaths.Add(MonoSearchPath); 104 | MonoSearchPath = FString(FPlatformProcess::BaseDir()) + "/Mono/Assemblies/"; 105 | MonoPreloadSearchPaths.Add(MonoSearchPath); 106 | 107 | FString InkSearchPath = FPaths::EnginePluginsDir() + "UnrealInk/ThirdParty/Ink/"; 108 | MonoPreloadSearchPaths.Add(InkSearchPath); 109 | InkSearchPath = FPaths::ProjectPluginsDir() + "UnrealInk/ThirdParty/Ink/"; 110 | MonoPreloadSearchPaths.Add(InkSearchPath); 111 | InkSearchPath = FString(FPlatformProcess::BaseDir()) + "Ink/"; 112 | MonoPreloadSearchPaths.Add(InkSearchPath); 113 | 114 | MonoSearchPath = FString(FPlatformProcess::BaseDir()) + "/"; 115 | MonoPreloadSearchPaths.Add(MonoSearchPath); 116 | 117 | mono_install_assembly_preload_hook(assembly_preload_hook, NULL); 118 | 119 | //Init mono into the main domain 120 | MainDomain = mono_jit_init(TCHAR_TO_UTF8(FApp::GetProjectName())); 121 | if (!MainDomain) 122 | { 123 | UE_LOG(LogInk, Fatal, TEXT("Initializing Mono for Ink plugin failed")); 124 | } 125 | 126 | // Load Ink Runtime assembly 127 | MonoAssembly *assembly; 128 | const char* assemblyPath = TCHAR_TO_UTF8(*FString(BaseDir + "/ThirdParty/Ink/InkGlue.dll")); 129 | 130 | if(!FPaths::FileExists(FString(assemblyPath))) 131 | assemblyPath = TCHAR_TO_UTF8(*FString(FString(FPlatformProcess::BaseDir()) + "/Ink/InkGlue.dll")); 132 | 133 | if (!FPaths::FileExists(FString(assemblyPath))) 134 | assemblyPath = TCHAR_TO_UTF8(*FString(FString(FPlatformProcess::BaseDir()) + "/InkGlue.dll")); 135 | 136 | assembly = mono_domain_assembly_open(MainDomain, assemblyPath); 137 | if (!assembly) 138 | { 139 | UE_LOG(LogInk, Fatal, TEXT("Failed To Load Ink Runtime Assembly")); 140 | } 141 | InkAssembly = mono_assembly_get_image(assembly); 142 | } 143 | 144 | //////////////////////////////////////////////////////// 145 | void FInkModule::ShutdownModule() 146 | { 147 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 148 | // we call this function before unloading the module. 149 | 150 | // Free the dll handle 151 | FPlatformProcess::FreeDllHandle(MonoLibraryHandle); 152 | MonoLibraryHandle = nullptr; 153 | } 154 | 155 | //////////////////////////////////////////////////////// 156 | MonoImage * FInkModule::GetInkAssemblyImage() 157 | { 158 | return InkAssembly; 159 | } 160 | 161 | MonoImage* FInkModule::GetMsCorLibImage() 162 | { 163 | return Mscorlib; 164 | } 165 | 166 | //////////////////////////////////////////////////////// 167 | MonoDomain * FInkModule::GetMonoDomain() 168 | { 169 | return MainDomain; 170 | } 171 | 172 | //////////////////////////////////////////////////////// 173 | void FInkModule::MaybeThrowMonoException(MonoObject* exception) 174 | { 175 | if (exception) 176 | { 177 | const char* error = mono_string_to_utf8(mono_object_to_string(exception, nullptr)); 178 | UE_LOG(LogInk, Error, TEXT("Ink Runtime Exception : %s"), *FString(error)); 179 | } 180 | } 181 | 182 | #undef LOCTEXT_NAMESPACE 183 | 184 | IMPLEMENT_MODULE(FInkModule, Ink) -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/InkCompiler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "InkCompiler.h" 4 | 5 | #include "Ink.h" 6 | 7 | #include 8 | 9 | 10 | //////////////////////////////////////////////////////// 11 | UInkCompiler::UInkCompiler() 12 | { 13 | 14 | } 15 | 16 | //////////////////////////////////////////////////////// 17 | UInkCompiler* UInkCompiler::NewInkCompiler(FString inkFileContents, FString inkFileName) 18 | { 19 | UInkCompiler* NewCompiler = NewObject(); 20 | 21 | MonoString* monoInkFileContents = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*(inkFileContents))); 22 | MonoString* monoInkFileName = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*(inkFileName))); 23 | void* args[2]; 24 | args[0] = monoInkFileContents; 25 | args[1] = monoInkFileName; 26 | 27 | NewCompiler->MonoNew(args, 2); 28 | 29 | return NewCompiler; 30 | } 31 | 32 | //////////////////////////////////////////////////////// 33 | TArray UInkCompiler::GetErrors() 34 | { 35 | TArray errors; 36 | 37 | MonoArray* result = MonoInvoke("GetErrors", nullptr); 38 | for (uintptr_t i = 0; i < mono_array_length(result); i++) 39 | { 40 | MonoString* variableName = mono_array_get(result, MonoString*, i); 41 | errors.Add(FString(mono_string_to_utf8(variableName))); 42 | } 43 | 44 | return errors; 45 | } 46 | 47 | //////////////////////////////////////////////////////// 48 | TArray UInkCompiler::GetWarnings() 49 | { 50 | TArray warnings; 51 | 52 | MonoArray* result = MonoInvoke("GetWarnings", nullptr); 53 | for (uintptr_t i = 0; i < mono_array_length(result); i++) 54 | { 55 | MonoString* variableName = mono_array_get(result, MonoString*, i); 56 | warnings.Add(FString(mono_string_to_utf8(variableName))); 57 | } 58 | 59 | return warnings; 60 | } 61 | 62 | //////////////////////////////////////////////////////// 63 | TArray UInkCompiler::GetAuthorMessages() 64 | { 65 | TArray messages; 66 | 67 | MonoArray* result = MonoInvoke("GetAuthorMessages", nullptr); 68 | for (uintptr_t i = 0; i < mono_array_length(result); i++) 69 | { 70 | MonoString* variableName = mono_array_get(result, MonoString*, i); 71 | messages.Add(FString(mono_string_to_utf8(variableName))); 72 | } 73 | 74 | return messages; 75 | } 76 | 77 | //////////////////////////////////////////////////////// 78 | FString UInkCompiler::CompileToJson() 79 | { 80 | return MonoInvoke("CompileToJson", NULL); 81 | } 82 | 83 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/InkVar.cpp: -------------------------------------------------------------------------------- 1 | #include "InkVar.h" 2 | 3 | #include "Misc/AssertionMacros.h" 4 | #include "Logging/TokenizedMessage.h" 5 | #include "Logging/MessageLog.h" 6 | 7 | #define LOCTEXT_NAMESPACE "UnrealInk" 8 | 9 | FInkVar::FInkVar(const FInkVarInterop& other) 10 | : type(other.type), 11 | floatVar(other.floatVal), 12 | intVar(other.intVal), 13 | stringVar(other.stringVal) 14 | { 15 | } 16 | 17 | FInkVarInterop FInkVar::ToInterop() const 18 | { 19 | FInkVarInterop result = { type, floatVar, intVar, nullptr }; 20 | if (type == EInkVarType::String) 21 | { 22 | UE_LOG(LogInk, Warning, TEXT("Sending strings to C# via InkVar not currently supported! It requires special memory management that can easily cause memory leaks")); 23 | } 24 | return result; 25 | } 26 | 27 | FText InkVarTypeToText(EInkVarType Type) 28 | { 29 | FText Result; 30 | switch (Type) 31 | { 32 | case EInkVarType::Float: return LOCTEXT("InkVarFloatType", "Float"); break; 33 | case EInkVarType::Int: return LOCTEXT("InkVarIntType", "Int"); break; 34 | case EInkVarType::String: return LOCTEXT("InkVarStringType", "String"); break; 35 | case EInkVarType::None: return LOCTEXT("InkVarNoneType", "None"); break; 36 | } 37 | return FText(); 38 | } 39 | 40 | void ThrowException(EInkVarType From, EInkVarType To) 41 | { 42 | TSharedRef Message = FTokenizedMessage::Create(EMessageSeverity::Error); 43 | Message->AddToken(FTextToken::Create(FText::Format(LOCTEXT("InkVarConversionMessageFmt", "Ink Var Conversion Error: Attempting to convert ink var of type \"{0}\" to type \"{1}\"."), InkVarTypeToText(From), InkVarTypeToText(To)))); 44 | FMessageLog("PIE").AddMessage(Message); 45 | } 46 | 47 | FString UInkVarLibrary::Conv_InkVarString(const FInkVar& InkVar) 48 | { 49 | if (InkVar.type != EInkVarType::String) 50 | { 51 | ThrowException(InkVar.type, EInkVarType::String); 52 | return FString(TEXT("")); 53 | } 54 | return InkVar.stringVar; 55 | } 56 | 57 | int UInkVarLibrary::Conv_InkVarInt(const FInkVar& InkVar) 58 | { 59 | if (InkVar.type != EInkVarType::Int) 60 | { 61 | ThrowException(InkVar.type, EInkVarType::Int); 62 | return 0; 63 | } 64 | return InkVar.intVar; 65 | } 66 | 67 | float UInkVarLibrary::Conv_InkVarFloat(const FInkVar& InkVar) 68 | { 69 | if (InkVar.type != EInkVarType::Float) 70 | { 71 | ThrowException(InkVar.type, EInkVarType::Float); 72 | return 0.f; 73 | } 74 | return InkVar.floatVar; 75 | } 76 | 77 | FName UInkVarLibrary::Conv_InkVarName(const FInkVar& InkVar) 78 | { 79 | if (InkVar.type != EInkVarType::String) 80 | { 81 | ThrowException(InkVar.type, EInkVarType::String); 82 | return NAME_None; 83 | } 84 | return FName(*InkVar.stringVar); 85 | } 86 | 87 | FText UInkVarLibrary::Conv_InkVarText(const FInkVar& InkVar) 88 | { 89 | if (InkVar.type != EInkVarType::String) 90 | { 91 | ThrowException(InkVar.type, EInkVarType::String); 92 | return FText::GetEmpty(); 93 | } 94 | return FText::FromString(InkVar.stringVar); 95 | } 96 | 97 | bool UInkVarLibrary::Conv_InkVarBool(const FInkVar& InkVar) 98 | { 99 | if (InkVar.type != EInkVarType::Int) 100 | { 101 | ThrowException(InkVar.type, EInkVarType::Int); 102 | return false; 103 | } 104 | return InkVar.intVar > 0; 105 | } 106 | 107 | FInkVar UInkVarLibrary::Conv_StringInkVar(const FString& String) 108 | { 109 | return FInkVar(String); 110 | } 111 | 112 | FInkVar UInkVarLibrary::Conv_IntInkVar(int Number) 113 | { 114 | return FInkVar(Number); 115 | } 116 | 117 | FInkVar UInkVarLibrary::Conv_FloatInkVar(float Number) 118 | { 119 | return FInkVar(Number); 120 | } 121 | 122 | FInkVar UInkVarLibrary::Conv_TextInkVar(const FText& Text) 123 | { 124 | return FInkVar(Text.ToString()); 125 | } 126 | 127 | FInkVar UInkVarLibrary::Conv_BoolInkVar(bool Boolean) 128 | { 129 | return FInkVar(Boolean ? 1 : 0); 130 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/MonoBaseClass.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "MonoBaseClass.h" 4 | 5 | #include "Ink.h" 6 | #include "Modules/ModuleManager.h" 7 | #include "Interfaces/IPluginManager.h" 8 | 9 | #include 10 | #include 11 | 12 | 13 | //////////////////////////////////////////////////////// 14 | UMonoBaseClass::UMonoBaseClass() 15 | { 16 | } 17 | 18 | //////////////////////////////////////////////////////// 19 | void UMonoBaseClass::MonoNew(void** params, int nParams) 20 | { 21 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 22 | FString GlueClassName = FString("Glue") + GetClass()->GetName(); 23 | Class = mono_class_from_name(Ink.GetInkAssemblyImage(), "InkGlue", TCHAR_TO_UTF8(*GlueClassName)); 24 | 25 | //Create a instance of the class 26 | Instance = mono_object_new(Ink.GetMonoDomain(), Class); 27 | 28 | // call the constructor 29 | MonoMethod* constructorMethod = mono_class_get_method_from_name(Class, ".ctor", nParams); 30 | MonoObject* exception{ nullptr }; 31 | mono_runtime_invoke(constructorMethod, Instance, params, &exception); 32 | Ink.MaybeThrowMonoException(exception); 33 | 34 | FindMethods(); 35 | } 36 | 37 | //////////////////////////////////////////////////////// 38 | void UMonoBaseClass::NewFromInstance(MonoObject* MonoInstance) 39 | { 40 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 41 | FString GlueClassName = FString("Glue") + GetClass()->GetName(); 42 | Class = mono_class_from_name(Ink.GetInkAssemblyImage(), "InkGlue", TCHAR_TO_UTF8(*GlueClassName)); 43 | Instance = MonoInstance; 44 | 45 | FindMethods(); 46 | } 47 | 48 | //////////////////////////////////////////////////////// 49 | void UMonoBaseClass::FindMethods() 50 | { 51 | for (TFieldIterator FunctionIt(GetClass(), EFieldIteratorFlags::IncludeSuper); FunctionIt; ++FunctionIt) 52 | { 53 | FString MethodName = FunctionIt->GetFName().ToString(); 54 | 55 | int numParams = FunctionIt->NumParms; 56 | if (FunctionIt->GetReturnProperty()) 57 | numParams--; 58 | 59 | MonoMethod* Method = mono_class_get_method_from_name(Class, TCHAR_TO_UTF8(*MethodName), numParams); 60 | 61 | if (Method) 62 | Methods.Add(MethodName, Method); 63 | } 64 | } 65 | 66 | void UMonoBaseClass::ManualMethodBind(FString MethodName, int numParams) 67 | { 68 | MonoMethod* Method = mono_class_get_method_from_name(Class, TCHAR_TO_UTF8(*MethodName), numParams); 69 | if (Method) 70 | Methods.Add(MethodName, Method); 71 | } 72 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/MonoBaseClass.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | #include "UObject/Object.h" 7 | #include 8 | 9 | #include "Ink.h" 10 | 11 | #include "MonoBaseClass.generated.h" 12 | 13 | 14 | typedef struct _MonoArray MonoArray; 15 | typedef struct _MonoObject MonoObject; 16 | typedef struct _MonoClass MonoClass; 17 | typedef struct _MonoMethod MonoMethod; 18 | 19 | class UObject; 20 | 21 | UCLASS() 22 | class INK_API UMonoBaseClass : public UObject 23 | { 24 | GENERATED_BODY() 25 | 26 | public: 27 | UMonoBaseClass(); 28 | 29 | protected: 30 | // Creates a new instance of this class in the mono domain ready for use 31 | void MonoNew(void** params, int nParams); 32 | 33 | // Creates the C++ representation of an object that's already been created in the mono domain 34 | void NewFromInstance(MonoObject* MonoInstance); 35 | 36 | // TODO Convert to use Variadics 37 | // Function invocation methods 38 | template 39 | inline type MonoInvoke(FString MethodName, void** params) 40 | { 41 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 42 | 43 | MonoObject* Exception; 44 | MonoObject* ret = mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception); 45 | Ink.MaybeThrowMonoException(Exception); 46 | 47 | return *(type*)mono_object_unbox(ret); 48 | } 49 | 50 | template<> 51 | inline void MonoInvoke(FString MethodName, void** params) 52 | { 53 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 54 | 55 | MonoObject* Exception; 56 | mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception); 57 | Ink.MaybeThrowMonoException(Exception); 58 | } 59 | 60 | template <> 61 | inline MonoObject* MonoInvoke(FString MethodName, void** params) 62 | { 63 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 64 | 65 | MonoObject* Exception; 66 | MonoObject* ret = mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception); 67 | Ink.MaybeThrowMonoException(Exception); 68 | return ret; 69 | } 70 | 71 | template <> 72 | inline MonoArray* MonoInvoke(FString MethodName, void** params) 73 | { 74 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 75 | 76 | MonoObject* Exception; 77 | MonoArray* ret = (MonoArray*)mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception); 78 | Ink.MaybeThrowMonoException(Exception); 79 | return ret; 80 | } 81 | 82 | template <> 83 | inline FString MonoInvoke(FString MethodName, void** params) 84 | { 85 | FInkModule& Ink = FModuleManager::GetModuleChecked("Ink"); 86 | 87 | MonoObject* Exception; 88 | MonoString* ret = (MonoString*)mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception); 89 | Ink.MaybeThrowMonoException(Exception); 90 | 91 | return FString(mono_string_to_utf16(ret)); 92 | } 93 | 94 | 95 | protected: 96 | void FindMethods(); 97 | void ManualMethodBind(FString MethodName, int numParams); 98 | 99 | TMap Methods; 100 | 101 | MonoClass* Class{ nullptr }; 102 | MonoObject* Instance{ nullptr }; 103 | }; 104 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/StoryAsset.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "StoryAsset.h" 4 | #include "EditorFramework/AssetImportData.h" 5 | 6 | //////////////////////////////////////////////////////// 7 | UStoryAsset::UStoryAsset() 8 | { 9 | 10 | } 11 | 12 | #if WITH_EDITORONLY_DATA 13 | void UStoryAsset::PostInitProperties() 14 | { 15 | if (!HasAnyFlags(RF_ClassDefaultObject)) 16 | { 17 | AssetImportData = NewObject(this, TEXT("AssetImportData")); 18 | } 19 | Super::PostInitProperties(); 20 | } 21 | 22 | void UStoryAsset::GetAssetRegistryTags(TArray& OutTags) const 23 | { 24 | if (AssetImportData) 25 | { 26 | OutTags.Add(FAssetRegistryTag(SourceFileTagName(), AssetImportData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden)); 27 | } 28 | 29 | Super::GetAssetRegistryTags(OutTags); 30 | } 31 | void UStoryAsset::Serialize(FArchive& Ar) 32 | { 33 | Super::Serialize(Ar); 34 | 35 | if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !AssetImportData) 36 | { 37 | // AssetImportData should always be valid 38 | AssetImportData = NewObject(this, TEXT("AssetImportData")); 39 | } 40 | } 41 | #endif -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/StoryState.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "StoryState.h" 4 | 5 | #include "Ink.h" 6 | 7 | #include 8 | 9 | 10 | //////////////////////////////////////////////////////// 11 | UStoryState::UStoryState() 12 | { 13 | 14 | } 15 | 16 | //////////////////////////////////////////////////////// 17 | UStoryState* UStoryState::NewStoryState(MonoObject* MonoStoryState) 18 | { 19 | UStoryState* NewStoryState = NewObject(); 20 | NewStoryState->NewFromInstance(MonoStoryState); 21 | return NewStoryState; 22 | } 23 | 24 | //////////////////////////////////////////////////////// 25 | int UStoryState::InkSaveStateVersion() 26 | { 27 | return MonoInvoke("InkSaveStateVersion", NULL); 28 | } 29 | 30 | //////////////////////////////////////////////////////// 31 | FString UStoryState::ToJson() 32 | { 33 | return MonoInvoke("ToJson", NULL); 34 | } 35 | 36 | //////////////////////////////////////////////////////// 37 | void UStoryState::LoadJson(FString Json) 38 | { 39 | MonoString* MonoJson = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*Json)); 40 | void* args[1]; 41 | args[0] = MonoJson; 42 | 43 | MonoInvoke("LoadJson", args); 44 | } 45 | 46 | //////////////////////////////////////////////////////// 47 | int UStoryState::VisitCountAtPathString(FString PathString) 48 | { 49 | MonoString* MonoPath = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*PathString)); 50 | void* args[1]; 51 | args[0] = MonoPath; 52 | 53 | return MonoInvoke("VisitCountAtPathString", args); 54 | } 55 | 56 | //////////////////////////////////////////////////////// 57 | FString UStoryState::CurrentPathString() 58 | { 59 | return MonoInvoke("CurrentPathString", NULL); 60 | } 61 | 62 | //////////////////////////////////////////////////////// 63 | void UStoryState::ForceEnd() 64 | { 65 | MonoInvoke("ForceEnd", NULL); 66 | } 67 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Private/VariableState.cpp: -------------------------------------------------------------------------------- 1 | #include "VariablesState.h" 2 | 3 | #include "Story.h" 4 | #include "StoryState.h" 5 | #include "MonoBaseClass.h" 6 | 7 | #include 8 | #include 9 | 10 | UVariablesState::UVariablesState() 11 | { 12 | 13 | } 14 | 15 | TArray UVariablesState::GetVariables() 16 | { 17 | TArray variableNames; 18 | 19 | // Grab variable names 20 | MonoArray* result = MonoInvoke("GetVariables", nullptr); 21 | for (uintptr_t i = 0; i < mono_array_length(result); i++) 22 | { 23 | MonoString* variableName = mono_array_get(result, MonoString*, i); 24 | variableNames.Add(FString(mono_string_to_utf8(variableName))); 25 | } 26 | 27 | return variableNames; 28 | } 29 | 30 | FInkVar UVariablesState::GetVariable(const FString& variableName) 31 | { 32 | // Single parameter: variable name 33 | void* params[1]; 34 | params[0] = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*variableName)); 35 | 36 | // Get result as a mono object 37 | MonoObject* result = MonoInvoke("GetVariable", params); 38 | MonoClass* pClass = mono_object_get_class(result); 39 | 40 | if (pClass == mono_get_single_class()) 41 | return FInkVar(*(float*)mono_object_unbox(result)); 42 | else if (pClass == mono_get_int32_class()) 43 | return FInkVar(*(int*)mono_object_unbox(result)); 44 | else if (pClass == mono_get_string_class()) 45 | return FInkVar(FString(mono_string_to_utf8((MonoString*)result))); 46 | 47 | checkf(false, TEXT("Expected either float, int, or string returned from VariablesState::GetVariable")); 48 | return FInkVar(0); 49 | } 50 | 51 | void UVariablesState::SetVariableFloat(const FString& variableName, float value) 52 | { 53 | void* params[2]; 54 | params[0] = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*variableName)); 55 | params[1] = mono_value_box(mono_domain_get(), mono_get_single_class(), &value); 56 | 57 | MonoInvoke("SetVariable", params); 58 | } 59 | 60 | void UVariablesState::SetVariableInt(const FString& variableName, int value) 61 | { 62 | void* params[2]; 63 | params[0] = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*variableName)); 64 | params[1] = mono_value_box(mono_domain_get(), mono_get_int32_class(), &value); 65 | 66 | MonoInvoke("SetVariable", params); 67 | } 68 | 69 | void UVariablesState::SetVariableString(const FString& variableName, const FString& value) 70 | { 71 | void* params[2]; 72 | params[0] = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*variableName)); 73 | params[1] = mono_string_new(mono_domain_get(), TCHAR_TO_UTF8(*value)); 74 | 75 | MonoInvoke("SetVariable", params); 76 | } 77 | 78 | void UVariablesState::SetVariable(const FString& variableName, const FInkVar& value) 79 | { 80 | if (!ensure(value.type != EInkVarType::None)) 81 | return; 82 | 83 | switch (value.type) 84 | { 85 | case EInkVarType::Float: 86 | SetVariableFloat(variableName, value.floatVar); 87 | break; 88 | case EInkVarType::Int: 89 | SetVariableInt(variableName, value.intVar); 90 | break; 91 | case EInkVarType::String: 92 | SetVariableString(variableName, value.stringVar); 93 | break; 94 | } 95 | } 96 | 97 | UVariablesState* UVariablesState::NewVariablesState(MonoObject* MonoVariableState) 98 | { 99 | UVariablesState* NewVariableState = NewObject(); 100 | NewVariableState->NewFromInstance(MonoVariableState); 101 | NewVariableState->ManualMethodBind("GetVariable", 1); 102 | return NewVariableState; 103 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/Choice.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MonoBaseClass.h" 6 | 7 | #include "Choice.generated.h" 8 | 9 | UCLASS(BlueprintType) 10 | class INK_API UChoice : public UMonoBaseClass 11 | { 12 | GENERATED_BODY() 13 | public: 14 | UChoice(); 15 | 16 | UFUNCTION(BlueprintPure, Category = Ink) 17 | FString Text(); 18 | 19 | UFUNCTION(BlueprintPure, Category = Ink) 20 | FString PathStringOnChoice(); 21 | 22 | UFUNCTION(BlueprintPure, Category = Ink) 23 | FString SourcePath(); 24 | 25 | UFUNCTION(BlueprintPure, Category = Ink) 26 | int Index(); 27 | 28 | private: 29 | // DO NOT USE! This is called internally with the ink glue instance of this choice. 30 | // Since the constructor is internal to InkGlue 31 | friend class UStory; 32 | static UChoice* NewChoice(MonoObject* MonoChoice); 33 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/Ink.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleInterface.h" 6 | 7 | typedef struct _MonoImage MonoImage; 8 | typedef struct _MonoDomain MonoDomain; 9 | typedef struct _MonoObject MonoObject; 10 | 11 | DECLARE_LOG_CATEGORY_EXTERN(LogInk, Log, All) 12 | 13 | class FInkModule : public IModuleInterface 14 | { 15 | public: 16 | 17 | /** IModuleInterface implementation */ 18 | virtual void StartupModule() override; 19 | virtual void ShutdownModule() override; 20 | 21 | // TODO: Make this a singleton private class where we do InkRuntime::Get()->Image 22 | // Raw access to Ink assembly. Not recommended to use this, mostly internal use only 23 | MonoImage* GetInkAssemblyImage(); 24 | 25 | // TODO: Make this a singleton private class where we do InkRuntime::Get()->Image 26 | MonoImage* GetMsCorLibImage(); 27 | 28 | // TODO: Make this a singleton private class where we do MonoDomain::Get() 29 | // Raw access to mono domain in which the Ink Runtime is being used 30 | MonoDomain* GetMonoDomain(); 31 | 32 | void MaybeThrowMonoException(MonoObject* exception); 33 | 34 | private: 35 | /** Handle to the mono dll */ 36 | void* MonoLibraryHandle; 37 | 38 | MonoImage* Mscorlib; 39 | MonoImage* InkAssembly; 40 | MonoDomain* MainDomain; 41 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/InkCompiler.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MonoBaseClass.h" 6 | 7 | #include "InkCompiler.generated.h" 8 | 9 | UCLASS(BlueprintType) 10 | class INK_API UInkCompiler: public UMonoBaseClass 11 | { 12 | GENERATED_BODY() 13 | public: 14 | UInkCompiler(); 15 | 16 | static UInkCompiler* NewInkCompiler(FString inkFileContents, FString inkFileName); 17 | 18 | UFUNCTION() 19 | TArray GetErrors(); 20 | 21 | UFUNCTION() 22 | TArray GetWarnings(); 23 | 24 | UFUNCTION() 25 | TArray GetAuthorMessages(); 26 | 27 | UFUNCTION() 28 | FString CompileToJson(); 29 | }; 30 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/InkVar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Kismet/BlueprintFunctionLibrary.h" 4 | 5 | #include "InkVar.generated.h" 6 | 7 | // A wrapper for passing around ink vars to and fro ink itself 8 | // Not templated so it can be used in blueprints 9 | UENUM(BlueprintType) 10 | enum class EInkVarType : uint8 11 | { 12 | Float, 13 | Int, 14 | String, 15 | None 16 | }; 17 | 18 | // Interop struct for passing between c#. Don't edit order! 19 | struct FInkVarInterop 20 | { 21 | EInkVarType type; 22 | float floatVal; 23 | int32 intVal; 24 | const char* stringVal; 25 | }; 26 | 27 | USTRUCT(BlueprintType) 28 | struct FInkVar 29 | { 30 | GENERATED_BODY() 31 | 32 | FInkVar() { type = EInkVarType::None; } 33 | 34 | FInkVar(float val) { type = EInkVarType::Float; floatVar = val; } 35 | FInkVar(int val) { type = EInkVarType::Int; intVar = val; } 36 | FInkVar(FString val) { type = EInkVarType::String; stringVar = val; } 37 | FInkVar(const FInkVarInterop& other); 38 | 39 | FInkVarInterop ToInterop() const; 40 | 41 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ink") 42 | EInkVarType type; 43 | 44 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ink") 45 | float floatVar; 46 | 47 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ink") 48 | int intVar; 49 | 50 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ink") 51 | FString stringVar; 52 | }; 53 | 54 | UCLASS() 55 | class INK_API UInkVarLibrary : public UBlueprintFunctionLibrary 56 | { 57 | GENERATED_BODY() 58 | 59 | public: 60 | UFUNCTION(BlueprintPure, meta = (DisplayName = "String (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 61 | static FString Conv_InkVarString(const FInkVar& InkVar); 62 | 63 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Int (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 64 | static int Conv_InkVarInt(const FInkVar& InkVar); 65 | 66 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Float (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 67 | static float Conv_InkVarFloat(const FInkVar& InkVar); 68 | 69 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Name (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 70 | static FName Conv_InkVarName(const FInkVar& InkVar); 71 | 72 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Text (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 73 | static FText Conv_InkVarText(const FInkVar& InkVar); 74 | 75 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Bool (Ink Var)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 76 | static bool Conv_InkVarBool(const FInkVar& InkVar); 77 | 78 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Ink Var (String)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 79 | static FInkVar Conv_StringInkVar(const FString& String); 80 | 81 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Ink Var (Int)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 82 | static FInkVar Conv_IntInkVar(int Number); 83 | 84 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Ink Var (Float)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 85 | static FInkVar Conv_FloatInkVar(float Number); 86 | 87 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Ink Var (Text)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 88 | static FInkVar Conv_TextInkVar(const FText& Text); 89 | 90 | UFUNCTION(BlueprintPure, meta = (DisplayName = "Ink Var (Bool)", CompactNodeTitle = "->", BlueprintAutocast), Category = "Ink") 91 | static FInkVar Conv_BoolInkVar(bool Boolean); 92 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/Story.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Delegates/DelegateCombinations.h" 6 | #include "MonoBaseClass.h" 7 | #include "InkVar.h" 8 | 9 | #include "Story.generated.h" 10 | 11 | class UStoryAsset; 12 | class UChoice; 13 | class UStoryState; 14 | 15 | DECLARE_DYNAMIC_DELEGATE_TwoParams(FVariableObserver, FString, variableName, FInkVar, newValue); 16 | DECLARE_DELEGATE_RetVal_TwoParams(FInkVar, FExternalFunctionHandler, FString, TArray); 17 | 18 | extern "C" __declspec(dllexport) void ObserverCallback(int InstanceId, const char* VariableName, FInkVarInterop* NewValue); 19 | extern "C" __declspec(dllexport) FInkVarInterop ExternalFunctionCallback(int32 InstanceId, const char* FunctionName, uint32 NumArgs, FInkVarInterop * pArgs); 20 | 21 | UCLASS(BlueprintType) 22 | class INK_API UStory : public UMonoBaseClass 23 | { 24 | GENERATED_BODY() 25 | 26 | public: 27 | UStory(); 28 | ~UStory(); 29 | 30 | UFUNCTION(BlueprintPure, Category = Ink) 31 | static int GetInkVersionCurrent() { return 19; } 32 | 33 | UFUNCTION(BlueprintCallable, Category = Ink) 34 | static UStory* NewStory(UStoryAsset* StoryAsset); 35 | 36 | UFUNCTION(BlueprintCallable, Category = Ink) 37 | FString Continue(); 38 | 39 | UFUNCTION(BlueprintPure, Category = Ink) 40 | bool CanContinue(); 41 | 42 | UFUNCTION(BlueprintCallable, Category = Ink) 43 | TArray CurrentChoices(); 44 | 45 | UFUNCTION(BlueprintCallable, Category = Ink) 46 | void ChooseChoiceIndex(int Index); 47 | 48 | UFUNCTION(BlueprintPure, Category = Ink) 49 | FString CurrentText(); 50 | 51 | UFUNCTION(BlueprintPure, Category = Ink) 52 | UStoryState* State(); 53 | 54 | UFUNCTION(BlueprintPure, Category = Ink) 55 | bool HasError(); 56 | 57 | UFUNCTION(BlueprintPure, Category = Ink) 58 | bool HasWarning(); 59 | 60 | UFUNCTION(BlueprintPure, Category = Ink) 61 | TArray CurrentTags(); 62 | 63 | UFUNCTION(BlueprintPure, Category = Ink) 64 | TArray GlobalTags(); 65 | 66 | UFUNCTION(BlueprintPure, Category = Ink) 67 | TArray CurrentErrors(); 68 | 69 | UFUNCTION(BlueprintPure, Category = Ink) 70 | TArray CurrentWarnings(); 71 | 72 | UFUNCTION(BlueprintCallable, Category = Ink) 73 | void ResetState(); 74 | 75 | UFUNCTION(BlueprintCallable, Category = Ink) 76 | void ResetErrors(); 77 | 78 | UFUNCTION(BlueprintCallable, Category = Ink) 79 | void ResetCallstack(); 80 | 81 | UFUNCTION(BlueprintCallable, Category = Ink) 82 | void ContinueAsync(float MillisecondLimitAsync); 83 | 84 | UFUNCTION(BlueprintCallable, Category = Ink) 85 | FString ContinueMaximally(); 86 | 87 | UFUNCTION(BlueprintCallable, Category = Ink) 88 | bool AsyncContinueComplete(); 89 | 90 | UFUNCTION(BlueprintCallable, Category = Ink) 91 | TArray TagsForContentAtPath(FString Path); 92 | 93 | UFUNCTION(BlueprintCallable, Category = Ink) 94 | void ChoosePathString(FString Path, bool ResetCallstack, TArray Vars); 95 | 96 | UFUNCTION(BlueprintPure, Category = Ink) 97 | class UVariablesState* VariablesState(); 98 | 99 | UFUNCTION(BlueprintCallable, Category = Ink) 100 | void ObserveVariable(FString variableName, const FVariableObserver& Observer); 101 | 102 | UFUNCTION(BlueprintCallable, Category = Ink) 103 | void ObserveVariables(TArray variableNames, const FVariableObserver& Observer); 104 | 105 | UFUNCTION(BlueprintCallable, Category = Ink) 106 | void RemoveVariableObserver(const FVariableObserver& Observer, FString SpecificVariableName = ""); 107 | 108 | UFUNCTION(BlueprintPure, Category = Ink) 109 | bool HasFunction(FString FunctionName); 110 | 111 | UFUNCTION(BlueprintCallable, Category = Ink, meta = (AutoCreateRefTerm = "Arguments")) 112 | FInkVar EvaluateFunction(FString FunctionName, TArray Arguments); 113 | 114 | UFUNCTION(BlueprintCallable, Category = Ink, meta = (AutoCreateRefTerm = "Arguments")) 115 | FInkVar EvaluateFunctionOutString(FString FunctionName, FString& OutString, TArray Arguments); 116 | 117 | void RegisterExternalFunction(FString FunctionName, const FExternalFunctionHandler& function); 118 | 119 | UFUNCTION(BlueprintCallable, Category = Ink) 120 | FString BuildStringOfHeirarchy(); 121 | 122 | UFUNCTION(BlueprintCallable, Category = Ink) 123 | UStoryState* CopyStateForBackgroundThreadSave(); 124 | 125 | UFUNCTION(BlueprintCallable, Category = Ink) 126 | void BackgroundSaveComplete(); 127 | 128 | private: 129 | typedef TPair FDelegateMapKey; 130 | static TMap> VarObserverMap; 131 | static TMap ExternalFuncMap; 132 | static int InstanceCounter; 133 | int InstanceId{ -1 }; 134 | 135 | friend __declspec(dllexport) void ObserverCallback(int InstanceId, const char* VariableName, FInkVarInterop* NewValue); 136 | friend __declspec(dllexport) FInkVarInterop ExternalFunctionCallback(int32 InstanceId, const char* FunctionName, uint32 NumArgs, FInkVarInterop * pArgs); 137 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/StoryAsset.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "UObject/Object.h" 6 | 7 | #include "Ink.h" 8 | 9 | #include "StoryAsset.generated.h" 10 | 11 | UCLASS(Blueprintable) 12 | class INK_API UStoryAsset : public UObject 13 | { 14 | GENERATED_BODY() 15 | 16 | public: 17 | UStoryAsset(); 18 | 19 | UPROPERTY() 20 | FString CompiledStory; 21 | 22 | #if WITH_EDITORONLY_DATA 23 | // Import data for this 24 | UPROPERTY(VisibleAnywhere, Instanced, Category = ImportSettings) 25 | class UAssetImportData* AssetImportData; 26 | 27 | // UObject interface 28 | virtual void PostInitProperties() override; 29 | virtual void GetAssetRegistryTags(TArray& OutTags) const override; 30 | virtual void Serialize(FArchive& Ar) override; 31 | // End of UObject interface 32 | #endif 33 | }; 34 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/StoryState.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "MonoBaseClass.h" 6 | 7 | #include "StoryState.generated.h" 8 | 9 | UCLASS(BlueprintType) 10 | class INK_API UStoryState : public UMonoBaseClass 11 | { 12 | GENERATED_BODY() 13 | public: 14 | UStoryState(); 15 | 16 | UFUNCTION(BlueprintCallable, Category = Ink) 17 | int InkSaveStateVersion(); 18 | 19 | UFUNCTION(BlueprintCallable, Category = Ink) 20 | FString ToJson(); 21 | 22 | UFUNCTION(BlueprintCallable, Category = Ink) 23 | void LoadJson(FString Json); 24 | 25 | UFUNCTION(BlueprintCallable, Category = Ink) 26 | int VisitCountAtPathString(FString PathString); 27 | 28 | UFUNCTION(BlueprintPure, Category = Ink) 29 | FString CurrentPathString(); 30 | 31 | UFUNCTION(BlueprintCallable, Category = Ink) 32 | void ForceEnd(); 33 | 34 | private: 35 | // DO NOT USE! This is called internally with the ink glue instance of this choice. 36 | // Since the constructor is internal to InkGlue 37 | friend class UStory; 38 | static UStoryState* NewStoryState(MonoObject* MonoStoryState); 39 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/Ink/Public/VariablesState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MonoBaseClass.h" 4 | 5 | #include "VariablesState.generated.h" 6 | 7 | struct FInkVar; 8 | 9 | UCLASS(BlueprintType) 10 | class INK_API UVariablesState : public UMonoBaseClass 11 | { 12 | GENERATED_BODY() 13 | public: 14 | UVariablesState(); 15 | 16 | UFUNCTION(BlueprintPure, Category = Ink) 17 | TArray GetVariables(); 18 | 19 | UFUNCTION(BlueprintPure, Category = Ink) 20 | FInkVar GetVariable(const FString& variableName); 21 | 22 | UFUNCTION(BlueprintCallable, Category = Ink) 23 | void SetVariableFloat(const FString& variableName, float value); 24 | 25 | UFUNCTION(BlueprintCallable, Category = Ink) 26 | void SetVariableInt(const FString& variableName, int value); 27 | 28 | UFUNCTION(BlueprintCallable, Category = Ink) 29 | void SetVariableString(const FString& variableName, const FString& value); 30 | 31 | UFUNCTION(BlueprintCallable, Category = Ink) 32 | void SetVariable(const FString& variableName, const FInkVar& value); 33 | 34 | private: 35 | friend class UStory; 36 | static UVariablesState* NewVariablesState(MonoObject* MonoVariableState); 37 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/InkEditor/InkEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | 6 | public class InkEditor : ModuleRules 7 | { 8 | private string ModulePath 9 | { 10 | get { return ModuleDirectory; } 11 | } 12 | 13 | private string ThirdPartyPath 14 | { 15 | get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); } 16 | } 17 | 18 | public InkEditor(ReadOnlyTargetRules Target) : base(Target) 19 | { 20 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 21 | 22 | OptimizeCode = CodeOptimization.Never; 23 | 24 | PublicIncludePaths.AddRange( 25 | new string[] { 26 | Path.Combine(ModulePath, "Public") 27 | // ... add public include paths required here ... 28 | } 29 | ); 30 | 31 | 32 | PrivateIncludePaths.AddRange( 33 | new string[] { 34 | Path.Combine(ModulePath, "Private"), 35 | Path.Combine(ModulePath, "../Ink/Private"), 36 | Path.Combine(ThirdPartyPath, "Mono", "include") 37 | } 38 | ); 39 | 40 | 41 | PublicDependencyModuleNames.AddRange( 42 | new string[] 43 | { 44 | "Core", 45 | "Projects", 46 | "CoreUObject", 47 | "Engine", 48 | "MessageLog", 49 | "UnrealEd", 50 | "Ink" 51 | // ... add other public dependencies that you statically link with here ... 52 | } 53 | ); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/InkEditor/Private/InkEditor.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "InkEditor.h" 4 | 5 | #include "AssetToolsModule.h" 6 | #include "MessageLogModule.h" 7 | 8 | #include "StoryAssetFactory.h" 9 | 10 | #define LOCTEXT_NAMESPACE "FInkEditorModule" 11 | 12 | DEFINE_LOG_CATEGORY(LogInkEditor) 13 | 14 | //////////////////////////////////////////////////////// 15 | void FInkEditorModule::StartupModule() 16 | { 17 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 18 | 19 | UE_LOG(LogInkEditor, Log, TEXT("Ink Editor Code Loaded")); 20 | 21 | // Register asset types 22 | IAssetTools& AssetTools = FModuleManager::LoadModuleChecked("AssetTools").Get(); 23 | { 24 | TSharedRef Action = MakeShareable(new FAssetTypeActions_StoryAsset); 25 | AssetTools.RegisterAssetTypeActions(Action); 26 | } 27 | 28 | FMessageLogModule& MessageLogModule = FModuleManager::LoadModuleChecked("MessageLog"); 29 | { 30 | FMessageLogInitializationOptions InitOptions; 31 | InitOptions.bAllowClear = true; 32 | InitOptions.bShowFilters = true; 33 | MessageLogModule.RegisterLogListing("InkCompiler", LOCTEXT("InkCompiler", "Ink Compiler"), InitOptions); 34 | } 35 | } 36 | 37 | //////////////////////////////////////////////////////// 38 | void FInkEditorModule::ShutdownModule() 39 | { 40 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 41 | // we call this function before unloading the module. 42 | } 43 | 44 | #undef LOCTEXT_NAMESPACE 45 | 46 | IMPLEMENT_MODULE(FInkEditorModule, InkEditor) -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/InkEditor/Private/StoryAssetFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #include "StoryAssetFactory.h" 4 | 5 | #include "HAL/PlatformFilemanager.h" 6 | #include "Misc/Paths.h" 7 | #include "Interfaces/IPluginManager.h" 8 | #include "InkEditor.h" 9 | #include "InkCompiler.h" 10 | #include "Misc/FileHelper.h" 11 | #include "Misc/FeedbackContext.h" 12 | #include "Logging/MessageLog.h" 13 | #include "EditorFramework/AssetImportData.h" 14 | 15 | void FAssetTypeActions_StoryAsset::GetResolvedSourceFilePaths(const TArray& TypeAssets, TArray& OutSourceFilePaths) const 16 | { 17 | for (auto& Asset : TypeAssets) 18 | { 19 | const auto StoryAsset = CastChecked(Asset); 20 | if (StoryAsset->AssetImportData) 21 | { 22 | StoryAsset->AssetImportData->ExtractFilenames(OutSourceFilePaths); 23 | } 24 | } 25 | } 26 | 27 | 28 | //////////////////////////////////////////////////////// 29 | UStoryAssetFactory::UStoryAssetFactory() 30 | { 31 | Formats.Add(FString(TEXT("ink;")) + NSLOCTEXT("UTextAssetFactory", "FormatTxt", "Ink Story File").ToString()); 32 | Formats.Add(FString(TEXT("json;")) + NSLOCTEXT("UTextAssetFactory", "FormatTxt", "Compiled Ink Story File").ToString()); 33 | SupportedClass = UStoryAsset::StaticClass(); 34 | bCreateNew = false; 35 | bEditorImport = true; 36 | 37 | } 38 | 39 | //////////////////////////////////////////////////////// 40 | bool UStoryAssetFactory::FactoryCanImport(const FString & Filename) 41 | { 42 | if (Filename.EndsWith("ink.json") || Filename.EndsWith("ink")) 43 | { 44 | return true; 45 | } 46 | return false; 47 | } 48 | 49 | //////////////////////////////////////////////////////// 50 | UObject * UStoryAssetFactory::FactoryCreateFile(UClass * InClass, UObject * InParent, FName InName, EObjectFlags Flags, const FString & Filename, const TCHAR * Parms, FFeedbackContext * Warn, bool & bOutOperationCanceled) 51 | { 52 | FString FileExtension = FPaths::GetExtension(Filename); 53 | 54 | GEditor->GetEditorSubsystem()->BroadcastAssetPreImport(this, InClass, InParent, InName, *FileExtension); 55 | 56 | UStoryAsset* NewStory = nullptr; 57 | FString FileContents; 58 | 59 | 60 | if (Filename.EndsWith("ink.json")) 61 | { 62 | // This is precompiled, just save the contents 63 | if (FFileHelper::LoadFileToString(FileContents, *Filename)) 64 | { 65 | FString Assetname = InName.ToString(); 66 | NewStory = NewObject(InParent, InClass, FName(*(Assetname.LeftChop(4))), Flags); 67 | NewStory->CompiledStory = FileContents; 68 | NewStory->AssetImportData->Update(Filename); 69 | } 70 | 71 | bOutOperationCanceled = false; 72 | 73 | GEditor->GetEditorSubsystem()->BroadcastAssetPostImport(this, NewStory); 74 | return NewStory; 75 | } 76 | else if (Filename.EndsWith("ink")) 77 | { 78 | 79 | if (FFileHelper::LoadFileToString(FileContents, *Filename)) 80 | { 81 | // Make new inkcompiler object 82 | UInkCompiler* compiler = UInkCompiler::NewInkCompiler(FileContents, Filename); 83 | 84 | FMessageLog InkCompilerLog("InkCompiler"); 85 | 86 | TArray warnings = compiler->GetWarnings(); 87 | if (warnings.Num() != 0) 88 | { 89 | for (int i = 0; i < warnings.Num(); i++) 90 | InkCompilerLog.Warning(FText::FromString(warnings[i])); 91 | } 92 | 93 | TArray authorMessages = compiler->GetAuthorMessages(); 94 | if (authorMessages.Num() != 0) 95 | { 96 | for (int i = 0; i < authorMessages.Num(); i++) 97 | InkCompilerLog.Info(FText::FromString(authorMessages[i])); 98 | } 99 | 100 | TArray errors = compiler->GetErrors(); 101 | if (errors.Num() != 0) 102 | { 103 | for (int i = 0; i < errors.Num(); i++) 104 | InkCompilerLog.Error(FText::FromString(errors[i])); 105 | 106 | InkCompilerLog.Open(EMessageSeverity::Error); 107 | bOutOperationCanceled = true; 108 | GEditor->GetEditorSubsystem()->BroadcastAssetPostImport(this, nullptr); 109 | return nullptr; 110 | } 111 | 112 | 113 | FString compiledStory = compiler->CompileToJson(); 114 | 115 | // Run the function 116 | NewStory = NewObject(InParent, InClass, InName, Flags); 117 | NewStory->CompiledStory = compiledStory; 118 | NewStory->AssetImportData->Update(Filename); 119 | 120 | bOutOperationCanceled = false; 121 | 122 | // profit 123 | GEditor->GetEditorSubsystem()->BroadcastAssetPostImport(this, NewStory); 124 | return NewStory; 125 | } 126 | } 127 | 128 | GEditor->GetEditorSubsystem()->BroadcastAssetPostImport(this, nullptr); 129 | return nullptr; 130 | } 131 | 132 | bool UStoryAssetFactory::CanReimport(UObject* Obj, TArray& OutFilenames) 133 | { 134 | UStoryAsset* StoryAsset = Cast(Obj); 135 | if (StoryAsset && StoryAsset->AssetImportData) 136 | { 137 | StoryAsset->AssetImportData->ExtractFilenames(OutFilenames); 138 | return true; 139 | } 140 | return false; 141 | } 142 | 143 | void UStoryAssetFactory::SetReimportPaths(UObject* Obj, const TArray& NewReimportPaths) 144 | { 145 | UStoryAsset* StoryAsset = Cast(Obj); 146 | if (StoryAsset && ensure(NewReimportPaths.Num() == 1)) 147 | { 148 | StoryAsset->AssetImportData->UpdateFilenameOnly(NewReimportPaths[0]); 149 | } 150 | } 151 | 152 | EReimportResult::Type UStoryAssetFactory::Reimport(UObject* Obj) 153 | { 154 | UStoryAsset* StoryAsset = Cast(Obj); 155 | if (StoryAsset != nullptr) 156 | { 157 | if (StoryAsset->AssetImportData) 158 | { 159 | bool bOperationCancelled = false; 160 | if (ImportObject(StoryAsset->GetClass(), StoryAsset->GetOuter(), *StoryAsset->GetName(), RF_Public | RF_Standalone, StoryAsset->AssetImportData->GetFirstFilename(), nullptr, bOperationCancelled) != nullptr) 161 | { 162 | return EReimportResult::Succeeded; 163 | } 164 | } 165 | } 166 | 167 | return EReimportResult::Failed; 168 | } 169 | 170 | int32 UStoryAssetFactory::GetPriority() const 171 | { 172 | return ImportPriority; 173 | } 174 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/InkEditor/Private/StoryAssetFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Factories/Factory.h" 6 | #include "UObject/ObjectMacros.h" 7 | #include "EditorReimportHandler.h" 8 | #include "AssetTypeActions_Base.h" 9 | #include "StoryAsset.h" 10 | #include "StoryAssetFactory.generated.h" 11 | 12 | class FAssetTypeActions_StoryAsset : public FAssetTypeActions_Base 13 | { 14 | public: 15 | // IAssetTypeActions Implementation 16 | virtual FText GetName() const override { return NSLOCTEXT("AssetTypeActions", "AssetTypeActions_StoryAsset", "Story Asset"); } 17 | virtual FColor GetTypeColor() const override { return FColor(175, 0, 128); } 18 | virtual UClass* GetSupportedClass() const override { return UStoryAsset::StaticClass(); } 19 | virtual bool IsImportedAsset() const override { return true; } 20 | virtual uint32 GetCategories() override { return EAssetTypeCategories::Misc; } 21 | virtual void GetResolvedSourceFilePaths(const TArray& TypeAssets, TArray& OutSourceFilePaths) const override; 22 | }; 23 | 24 | UCLASS(hidecategories = Object) 25 | class UStoryAssetFactory : public UFactory, public FReimportHandler 26 | { 27 | GENERATED_BODY() 28 | 29 | UStoryAssetFactory(); 30 | 31 | //~ UFactory interface 32 | virtual bool FactoryCanImport(const FString& Filename); 33 | virtual UObject* FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled) override; 34 | //~ UFactory interface 35 | 36 | //~ Begin FReimportHandler Interface 37 | virtual bool CanReimport(UObject* Obj, TArray& OutFilenames) override; 38 | virtual void SetReimportPaths(UObject* Obj, const TArray& NewReimportPaths) override; 39 | virtual EReimportResult::Type Reimport(UObject* Obj) override; 40 | virtual int32 GetPriority() const override; 41 | //~ End FReimportHandler Interface 42 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/InkEditor/Public/InkEditor.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 David Colson. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleInterface.h" 6 | 7 | DECLARE_LOG_CATEGORY_EXTERN(LogInkEditor, Log, All) 8 | 9 | class FInkEditorModule : public IModuleInterface 10 | { 11 | public: 12 | 13 | /** IModuleInterface implementation */ 14 | virtual void StartupModule() override; 15 | virtual void ShutdownModule() override; 16 | 17 | private: 18 | }; -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30413.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InkGlue", "InkGlue\InkGlue.csproj", "{CB5F67C5-84F7-4C87-9FCB-75D05AFDA303}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InkGlueTest", "InkGlueTest\InkGlueTest.csproj", "{903E08A3-7B5F-4318-8F71-E2225381B623}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {CB5F67C5-84F7-4C87-9FCB-75D05AFDA303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {CB5F67C5-84F7-4C87-9FCB-75D05AFDA303}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {CB5F67C5-84F7-4C87-9FCB-75D05AFDA303}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {CB5F67C5-84F7-4C87-9FCB-75D05AFDA303}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {903E08A3-7B5F-4318-8F71-E2225381B623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {903E08A3-7B5F-4318-8F71-E2225381B623}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {903E08A3-7B5F-4318-8F71-E2225381B623}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {903E08A3-7B5F-4318-8F71-E2225381B623}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {C4FFD662-4E55-49F6-BDB0-EFA70B895817} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/GlueChoice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Ink.Runtime; 5 | 6 | 7 | namespace InkGlue 8 | { 9 | public class GlueChoice 10 | { 11 | internal GlueChoice(Choice inChoice) 12 | { 13 | _choice = inChoice; 14 | } 15 | 16 | public string Text() 17 | { 18 | return _choice.text; 19 | } 20 | 21 | public string PathStringOnChoice() 22 | { 23 | return _choice.pathStringOnChoice; 24 | } 25 | 26 | public string SourcePath() 27 | { 28 | return _choice.sourcePath; 29 | } 30 | 31 | public int Index() 32 | { 33 | return _choice.index; 34 | } 35 | 36 | Choice _choice; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/GlueCompiler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using Ink.Runtime; 6 | using Ink; 7 | 8 | namespace InkGlue 9 | { 10 | public class GlueInkCompiler: Ink.IFileHandler 11 | { 12 | public string ResolveInkFilename(string includeName) 13 | { 14 | var workingDir = Directory.GetCurrentDirectory(); 15 | var fullRootInkPath = Path.Combine(workingDir, includeName); 16 | return fullRootInkPath; 17 | } 18 | 19 | public string LoadInkFileContents(string fullFilename) 20 | { 21 | return File.ReadAllText(fullFilename); 22 | } 23 | 24 | public GlueInkCompiler(string storyFileContents, string storyFileName) 25 | { 26 | errors = new List(); 27 | warnings = new List(); 28 | authorMessages = new List(); 29 | 30 | // Create compiler object 31 | compiler = new Compiler(storyFileContents, new Compiler.Options 32 | { 33 | sourceFilename = storyFileName, 34 | pluginNames = null, 35 | countAllVisits = false, 36 | errorHandler = OnError, 37 | fileHandler = this 38 | }); 39 | 40 | story = compiler.Compile(); 41 | } 42 | 43 | public string CompileToJson() 44 | { 45 | if (story) 46 | return story.ToJson(); 47 | return ""; 48 | } 49 | public string[] GetErrors() 50 | { 51 | return errors.ToArray(); 52 | } 53 | 54 | public string[] GetWarnings() 55 | { 56 | return warnings.ToArray(); 57 | } 58 | 59 | public string[] GetAuthorMessages() 60 | { 61 | return authorMessages.ToArray(); 62 | } 63 | 64 | private void OnError(string message, ErrorType type) 65 | { 66 | switch (type) 67 | { 68 | case ErrorType.Author: 69 | authorMessages.Add(message); 70 | break; 71 | 72 | case ErrorType.Warning: 73 | warnings.Add(message); 74 | break; 75 | 76 | case ErrorType.Error: 77 | errors.Add(message); 78 | break; 79 | } 80 | } 81 | 82 | Story story; 83 | Compiler compiler; 84 | List errors; 85 | List warnings; 86 | List authorMessages; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/GlueStory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using Ink.Runtime; 5 | 6 | namespace InkGlue 7 | { 8 | public enum InkVarType 9 | { 10 | Float, 11 | Int, 12 | String, 13 | None 14 | } 15 | 16 | // Don't change structure of this without changing matching C++ interop struct 17 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 18 | public struct InkVarInterop 19 | { 20 | [MarshalAs(UnmanagedType.U1)] 21 | public byte Type; 22 | 23 | [MarshalAs(UnmanagedType.R4)] 24 | public float FloatVal; 25 | 26 | [MarshalAs(UnmanagedType.I4)] 27 | public int IntVal; 28 | 29 | [MarshalAs(UnmanagedType.LPStr)] 30 | public string StringVal; 31 | 32 | public InkVarInterop(object arg) 33 | { 34 | FloatVal = 0; IntVal = 0; StringVal = null; 35 | 36 | if (arg is float) 37 | { 38 | FloatVal = (float)arg; 39 | Type = 0; 40 | } 41 | else if (arg is int) 42 | { 43 | IntVal = (int)arg; 44 | Type = 1; 45 | } 46 | else if (arg is string) 47 | { 48 | StringVal = (string)arg; 49 | Type = 2; 50 | } 51 | else 52 | { 53 | throw new Exception("Invalid Ink Variable Type: " + arg.GetType()); 54 | } 55 | } 56 | 57 | public object BoxedValue 58 | { 59 | get 60 | { 61 | switch (Type) 62 | { 63 | case 0: 64 | return FloatVal; 65 | case 1: 66 | return IntVal; 67 | case 2: 68 | return StringVal; 69 | default: 70 | case 3: 71 | return null; 72 | } 73 | } 74 | } 75 | } 76 | 77 | public class GlueStory 78 | { 79 | [DllImport("__Internal")] 80 | public static extern void ObserverCallback(int instanceId, [MarshalAs(UnmanagedType.LPStr)] string variableName, InkVarInterop newValue); 81 | 82 | [DllImport("__Internal")] 83 | public static extern InkVarInterop ExternalFunctionCallback([MarshalAs(UnmanagedType.I4)] int instanceId, [MarshalAs(UnmanagedType.LPStr)] string functionName, [MarshalAs(UnmanagedType.U4)] uint numArguments, [MarshalAs(UnmanagedType.LPArray)] InkVarInterop[] arguments); 84 | 85 | public GlueStory(string JsonString, int instanceId) 86 | { 87 | _story = new Story(JsonString); 88 | _instanceId = instanceId; 89 | } 90 | 91 | public bool CanContinue() 92 | { 93 | return _story.canContinue; 94 | } 95 | 96 | public string Continue() 97 | { 98 | return _story.Continue(); 99 | } 100 | 101 | public GlueChoice[] CurrentChoices() 102 | { 103 | GlueChoice[] glueChoices = new GlueChoice[_story.currentChoices.Count]; 104 | for (int i = 0; i < _story.currentChoices.Count; i++) 105 | { 106 | glueChoices[i] = new GlueChoice(_story.currentChoices[i]); 107 | } 108 | return glueChoices; 109 | } 110 | 111 | public void ChooseChoiceIndex(int index) 112 | { 113 | _story.ChooseChoiceIndex(index); 114 | } 115 | 116 | public string CurrentText() 117 | { 118 | return _story.currentText; 119 | } 120 | 121 | public GlueStoryState State() 122 | { 123 | return new GlueStoryState(_story.state); 124 | } 125 | 126 | public bool HasError() 127 | { 128 | return _story.hasError; 129 | } 130 | 131 | public bool HasWarning() 132 | { 133 | return _story.hasWarning; 134 | } 135 | 136 | public string[] CurrentTags() 137 | { 138 | return _story.currentTags.ToArray(); 139 | } 140 | 141 | public string[] GlobalTags() 142 | { 143 | return _story.globalTags.ToArray(); 144 | } 145 | 146 | public string[] CurrentErrors() 147 | { 148 | return _story.currentErrors.ToArray(); 149 | } 150 | 151 | public string[] CurrentWarnings() 152 | { 153 | return _story.currentWarnings.ToArray(); 154 | } 155 | 156 | public void ResetState() 157 | { 158 | _story.ResetState(); 159 | } 160 | 161 | public void ResetErrors() 162 | { 163 | _story.ResetErrors(); 164 | } 165 | 166 | public void ResetCallstack() 167 | { 168 | _story.ResetCallstack(); 169 | } 170 | 171 | public void ContinueAsync(float millisecondLimitAsync) 172 | { 173 | _story.ContinueAsync(millisecondLimitAsync); 174 | } 175 | 176 | public string ContinueMaximally() 177 | { 178 | return _story.ContinueMaximally(); 179 | } 180 | 181 | public bool AsyncContinueComplete() 182 | { 183 | return _story.asyncContinueComplete; 184 | } 185 | 186 | public string[] TagsForContentAtPath(string path) 187 | { 188 | List tags = _story.TagsForContentAtPath(path); 189 | if (tags == null) 190 | return new string[0]; 191 | else 192 | return tags.ToArray(); 193 | } 194 | 195 | public void ChoosePathString(string path, object[] arguments, bool resetCallStack = true) 196 | { 197 | _story.ChoosePathString(path, resetCallStack, arguments); 198 | } 199 | 200 | public GlueVariablesState VariablesState() 201 | { 202 | return new GlueVariablesState(_story.variablesState); 203 | } 204 | 205 | void InternalObserve(string variableName, object newValue) 206 | { 207 | ObserverCallback(_instanceId, variableName, new InkVarInterop(newValue)); 208 | } 209 | 210 | public void ObserveVariable(string variableName) 211 | { 212 | _story.ObserveVariable(variableName, InternalObserve); 213 | } 214 | 215 | public void RemoveVariableObserver(string variableName) 216 | { 217 | _story.RemoveVariableObserver(InternalObserve, variableName); 218 | } 219 | 220 | public bool HasFunction(string functionName) 221 | { 222 | return _story.HasFunction(functionName); 223 | } 224 | 225 | public object EvaluateFunction(string functionName, out string textOutput, object[] arguments) 226 | { 227 | return _story.EvaluateFunction(functionName, out textOutput, arguments); 228 | } 229 | 230 | object InternalFunctionHandler(string functionName, object[] args) 231 | { 232 | // Convert arguments into Interop Variable structs 233 | InkVarInterop[] cArgs = new InkVarInterop[args.Length]; 234 | for (int i = 0; i < args.Length; i++) 235 | { 236 | cArgs[i] = new InkVarInterop(args[i]); 237 | } 238 | 239 | // Call the callback 240 | InkVarInterop var = ExternalFunctionCallback(_instanceId, functionName, (uint)cArgs.Length, cArgs); 241 | 242 | return var.BoxedValue; 243 | } 244 | 245 | public void RegisterFunction(string functionName) 246 | { 247 | // Bind to internal C# method 248 | _story.BindExternalFunctionGeneral(functionName, args => InternalFunctionHandler(functionName, args)); 249 | } 250 | 251 | public void UnregisterFunction(string functionName) 252 | { 253 | // Unbind 254 | _story.UnbindExternalFunction(functionName); 255 | } 256 | 257 | public string BuildStringOfHeirarchy() 258 | { 259 | return _story.BuildStringOfHierarchy(); 260 | } 261 | 262 | public GlueStoryState CopyStateForBackgroundThreadSave() 263 | { 264 | return new GlueStoryState(_story.CopyStateForBackgroundThreadSave()); 265 | } 266 | 267 | public void BackgroundSaveComplete() 268 | { 269 | _story.BackgroundSaveComplete(); 270 | } 271 | 272 | Story _story; 273 | int _instanceId = -1; 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/GlueStoryState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Ink.Runtime; 5 | 6 | namespace InkGlue 7 | { 8 | public class GlueStoryState 9 | { 10 | internal GlueStoryState(StoryState inStoryState) 11 | { 12 | _storyState = inStoryState; 13 | } 14 | 15 | public int InkSaveStateVersion() 16 | { 17 | return StoryState.kInkSaveStateVersion; 18 | } 19 | 20 | public string ToJson() 21 | { 22 | return _storyState.ToJson(); 23 | } 24 | 25 | public void LoadJson(string json) 26 | { 27 | _storyState.LoadJson(json); 28 | } 29 | 30 | public int VisitCountAtPathString(string pathString) 31 | { 32 | return _storyState.VisitCountAtPathString(pathString); 33 | } 34 | 35 | public void ForceEnd() 36 | { 37 | _storyState.ForceEnd(); 38 | } 39 | 40 | public string CurrentPathString() 41 | { 42 | return _storyState.currentPathString; 43 | } 44 | 45 | StoryState _storyState; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/GlueVariablesState.cs: -------------------------------------------------------------------------------- 1 | using Ink.Runtime; 2 | using System.Linq; 3 | 4 | namespace InkGlue 5 | { 6 | public class GlueVariablesState 7 | { 8 | internal GlueVariablesState(VariablesState inVariablesState) 9 | { 10 | _variablesState = inVariablesState; 11 | } 12 | 13 | public string[] GetVariables() 14 | { 15 | return _variablesState.ToArray(); 16 | } 17 | 18 | public object GetVariable(string name) 19 | { 20 | return _variablesState[name]; 21 | } 22 | 23 | public void SetVariable(string name, object value) 24 | { 25 | _variablesState[name] = value; 26 | } 27 | 28 | VariablesState _variablesState; 29 | } 30 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlue/InkGlue.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | 7 | 8 | netcoreapp3.1 9 | 10 | 11 | 12 | ..\..\..\..\ThirdParty\Ink\ 13 | 14 | 15 | 16 | ..\..\..\..\ThirdParty\Ink\ 17 | 18 | 19 | 20 | 21 | ..\..\..\..\ThirdParty\Ink\ink-engine-runtime.dll 22 | 23 | 24 | ..\..\..\..\ThirdParty\Ink\ink_compiler.dll 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlueTest/InkGlueTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | InkGlueTest.Program 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlueTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using InkGlue; 5 | 6 | namespace InkGlueTest 7 | { 8 | class Program 9 | { 10 | // Ink Glue Test 11 | // Testing program especially for testing specific things in the managed world and debugging C# code 12 | // ------------------------------------------------------------------------------------------------- 13 | 14 | 15 | static void Main(string[] args) 16 | { 17 | string text = File.ReadAllText(@"C:\Dev\UnrealInkExample\Content\MonsieurFog.ink"); 18 | 19 | InkGlue.GlueInkCompiler compiler = new InkGlue.GlueInkCompiler(text, "MonsieurFog.ink"); 20 | 21 | string json = compiler.CompileToJson(); 22 | 23 | GlueStory story = new GlueStory(json, 1); 24 | 25 | story.ObserveVariable("fogs_string_mood"); 26 | story.ObserveVariable("fogs_current_mood"); 27 | story.RemoveVariableObserver("fogs_string_mood"); 28 | 29 | while(story.CanContinue()) 30 | { 31 | Console.WriteLine(story.ContinueMaximally()); 32 | 33 | if (story.CurrentChoices().Length > 0) 34 | { 35 | for (int i = 0; i < story.CurrentChoices().Length; i++) 36 | { 37 | GlueChoice choice = story.CurrentChoices()[i]; 38 | Console.WriteLine(i + " " + choice.Text()); 39 | } 40 | } 41 | Console.WriteLine("Enter Choice: "); 42 | string chosen = Console.ReadLine(); 43 | int chosenIndex = Int32.Parse(chosen); 44 | story.ChooseChoiceIndex(chosenIndex); 45 | } 46 | 47 | //int choice = Console.ReadLine(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/Source/ThirdParty/InkGlue/InkGlueTest/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "InkGlueTest": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Ink/InkGlue.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v3.1", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v3.1": { 9 | "InkGlue/1.0.0": { 10 | "dependencies": { 11 | "ink-engine-runtime": "1.0.7588.26263", 12 | "ink_compiler": "1.0.7588.26263" 13 | }, 14 | "runtime": { 15 | "InkGlue.dll": {} 16 | } 17 | }, 18 | "ink-engine-runtime/1.0.7588.26263": { 19 | "runtime": { 20 | "ink-engine-runtime.dll": { 21 | "assemblyVersion": "1.0.7588.26263", 22 | "fileVersion": "1.0.7588.26263" 23 | } 24 | } 25 | }, 26 | "ink_compiler/1.0.7588.26263": { 27 | "runtime": { 28 | "ink_compiler.dll": { 29 | "assemblyVersion": "1.0.7588.26263", 30 | "fileVersion": "1.0.7588.26263" 31 | } 32 | } 33 | } 34 | } 35 | }, 36 | "libraries": { 37 | "InkGlue/1.0.0": { 38 | "type": "project", 39 | "serviceable": false, 40 | "sha512": "" 41 | }, 42 | "ink-engine-runtime/1.0.7588.26263": { 43 | "type": "reference", 44 | "serviceable": false, 45 | "sha512": "" 46 | }, 47 | "ink_compiler/1.0.7588.26263": { 48 | "type": "reference", 49 | "serviceable": false, 50 | "sha512": "" 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Ink/InkGlue.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Ink/InkGlue.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Ink/ink-engine-runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Ink/ink-engine-runtime.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Ink/ink_compiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Ink/ink_compiler.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Collections.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Collections.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Core.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Diagnostics.Debug.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Diagnostics.Debug.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Globalization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Globalization.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.IO.FileSystem.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.IO.FileSystem.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Linq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Linq.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.Extensions.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.InteropServices.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.InteropServices.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Runtime.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Threading.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.Threading.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/System.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/assemblies/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/assemblies/mscorlib.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/jit/jit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Author: 4 | * Dietmar Maurer (dietmar@ximian.com) 5 | * 6 | * (C) 2001, 2002, 2003 Ximian, Inc. 7 | */ 8 | 9 | #ifndef _MONO_JIT_JIT_H_ 10 | #define _MONO_JIT_JIT_H_ 11 | 12 | #include 13 | 14 | MONO_BEGIN_DECLS 15 | 16 | MONO_API MonoDomain * 17 | mono_jit_init (const char *file); 18 | 19 | MONO_API MonoDomain * 20 | mono_jit_init_version (const char *root_domain_name, const char *runtime_version); 21 | 22 | MONO_API int 23 | mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, 24 | int argc, char *argv[]); 25 | MONO_API void 26 | mono_jit_cleanup (MonoDomain *domain); 27 | 28 | MONO_API mono_bool 29 | mono_jit_set_trace_options (const char* options); 30 | 31 | MONO_API void 32 | mono_set_signal_chaining (mono_bool chain_signals); 33 | 34 | MONO_API void 35 | mono_set_crash_chaining (mono_bool chain_signals); 36 | 37 | /** 38 | * This function is deprecated, use mono_jit_set_aot_mode instead. 39 | */ 40 | MONO_API void 41 | mono_jit_set_aot_only (mono_bool aot_only); 42 | 43 | /** 44 | * Allows control over our AOT (Ahead-of-time) compilation mode. 45 | */ 46 | typedef enum { 47 | /* Disables AOT mode */ 48 | MONO_AOT_MODE_NONE, 49 | /* Enables normal AOT mode, equivalent to mono_jit_set_aot_only (false) */ 50 | MONO_AOT_MODE_NORMAL, 51 | /* Enables hybrid AOT mode, JIT can still be used for wrappers */ 52 | MONO_AOT_MODE_HYBRID, 53 | /* Enables full AOT mode, JIT is disabled and not allowed, 54 | * equivalent to mono_jit_set_aot_only (true) */ 55 | MONO_AOT_MODE_FULL, 56 | /* Same as full, but use only llvm compiled code */ 57 | MONO_AOT_MODE_LLVMONLY, 58 | /* Uses Interpreter, JIT is disabled and not allowed, 59 | * equivalent to "--full-aot --interpreter" */ 60 | MONO_AOT_MODE_INTERP 61 | } MonoAotMode; 62 | 63 | MONO_API void 64 | mono_jit_set_aot_mode (MonoAotMode mode); 65 | 66 | /* Allow embedders to decide wherther to actually obey breakpoint instructions 67 | * in specific methods (works for both break IL instructions and Debugger.Break () 68 | * method calls). 69 | */ 70 | typedef enum { 71 | /* the default is to always obey the breakpoint */ 72 | MONO_BREAK_POLICY_ALWAYS, 73 | /* a nop is inserted instead of a breakpoint */ 74 | MONO_BREAK_POLICY_NEVER, 75 | /* the breakpoint is executed only if the program has ben started under 76 | * the debugger (that is if a debugger was attached at the time the method 77 | * was compiled). 78 | */ 79 | MONO_BREAK_POLICY_ON_DBG 80 | } MonoBreakPolicy; 81 | 82 | typedef MonoBreakPolicy (*MonoBreakPolicyFunc) (MonoMethod *method); 83 | MONO_API void mono_set_break_policy (MonoBreakPolicyFunc policy_callback); 84 | 85 | MONO_API void 86 | mono_jit_parse_options (int argc, char * argv[]); 87 | 88 | MONO_API char* mono_get_runtime_build_info (void); 89 | 90 | /* The following APIs are not stable. Avoid if possible. */ 91 | 92 | MONO_API MonoJitInfo * 93 | mono_get_jit_info_from_method (MonoDomain *domain, MonoMethod *method); 94 | 95 | MONO_API MONO_RT_EXTERNAL_ONLY void * 96 | mono_aot_get_method (MonoDomain *domain, MonoMethod *method); 97 | 98 | MONO_END_DECLS 99 | 100 | #endif 101 | 102 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/appdomain.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * AppDomain functions 4 | * 5 | * Author: 6 | * Dietmar Maurer (dietmar@ximian.com) 7 | * 8 | * (C) 2001 Ximian, Inc. 9 | */ 10 | 11 | #ifndef _MONO_METADATA_APPDOMAIN_H_ 12 | #define _MONO_METADATA_APPDOMAIN_H_ 13 | 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | MONO_BEGIN_DECLS 20 | 21 | typedef void (*MonoThreadStartCB) (intptr_t tid, void* stack_start, 22 | void* func); 23 | typedef void (*MonoThreadAttachCB) (intptr_t tid, void* stack_start); 24 | 25 | typedef struct _MonoAppDomain MonoAppDomain; 26 | typedef struct _MonoJitInfo MonoJitInfo; 27 | 28 | typedef void (*MonoDomainFunc) (MonoDomain *domain, void* user_data); 29 | 30 | MONO_API MonoDomain* 31 | mono_init (const char *filename); 32 | 33 | MONO_API MonoDomain * 34 | mono_init_from_assembly (const char *domain_name, const char *filename); 35 | 36 | MONO_API MonoDomain * 37 | mono_init_version (const char *domain_name, const char *version); 38 | 39 | MONO_API MonoDomain* 40 | mono_get_root_domain (void); 41 | 42 | MONO_RT_EXTERNAL_ONLY 43 | MONO_API void 44 | mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb, 45 | MonoThreadAttachCB attach_cb); 46 | 47 | MONO_API void 48 | mono_runtime_cleanup (MonoDomain *domain); 49 | 50 | MONO_API void 51 | mono_install_runtime_cleanup (MonoDomainFunc func); 52 | 53 | MONO_API void 54 | mono_runtime_quit (void); 55 | 56 | MONO_API void 57 | mono_runtime_set_shutting_down (void); 58 | 59 | MONO_API mono_bool 60 | mono_runtime_is_shutting_down (void); 61 | 62 | MONO_API const char* 63 | mono_check_corlib_version (void); 64 | 65 | MONO_API MonoDomain * 66 | mono_domain_create (void); 67 | 68 | MONO_RT_EXTERNAL_ONLY 69 | MONO_API MonoDomain * 70 | mono_domain_create_appdomain (char *friendly_name, char *configuration_file); 71 | 72 | MONO_RT_EXTERNAL_ONLY 73 | MONO_API void 74 | mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name); 75 | 76 | MONO_API MonoDomain * 77 | mono_domain_get (void); 78 | 79 | MONO_API MonoDomain * 80 | mono_domain_get_by_id (int32_t domainid); 81 | 82 | MONO_API int32_t 83 | mono_domain_get_id (MonoDomain *domain); 84 | 85 | MONO_API const char * 86 | mono_domain_get_friendly_name (MonoDomain *domain); 87 | 88 | MONO_API mono_bool 89 | mono_domain_set (MonoDomain *domain, mono_bool force); 90 | 91 | MONO_API void 92 | mono_domain_set_internal (MonoDomain *domain); 93 | 94 | MONO_RT_EXTERNAL_ONLY 95 | MONO_API void 96 | mono_domain_unload (MonoDomain *domain); 97 | 98 | MONO_API void 99 | mono_domain_try_unload (MonoDomain *domain, MonoObject **exc); 100 | 101 | MONO_API mono_bool 102 | mono_domain_is_unloading (MonoDomain *domain); 103 | 104 | MONO_RT_EXTERNAL_ONLY 105 | MONO_API MonoDomain * 106 | mono_domain_from_appdomain (MonoAppDomain *appdomain); 107 | 108 | MONO_API void 109 | mono_domain_foreach (MonoDomainFunc func, void* user_data); 110 | 111 | MONO_API MonoAssembly * 112 | mono_domain_assembly_open (MonoDomain *domain, const char *name); 113 | 114 | MONO_API mono_bool 115 | mono_domain_finalize (MonoDomain *domain, uint32_t timeout); 116 | 117 | MONO_API void 118 | mono_domain_free (MonoDomain *domain, mono_bool force); 119 | 120 | MONO_API mono_bool 121 | mono_domain_has_type_resolve (MonoDomain *domain); 122 | 123 | MONO_RT_EXTERNAL_ONLY 124 | MONO_API MonoReflectionAssembly * 125 | mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb); 126 | 127 | MONO_API mono_bool 128 | mono_domain_owns_vtable_slot (MonoDomain *domain, void* vtable_slot); 129 | 130 | MONO_RT_EXTERNAL_ONLY 131 | MONO_API void 132 | mono_context_init (MonoDomain *domain); 133 | 134 | MONO_RT_EXTERNAL_ONLY 135 | MONO_API void 136 | mono_context_set (MonoAppContext *new_context); 137 | 138 | MONO_API MonoAppContext * 139 | mono_context_get (void); 140 | 141 | MONO_API int32_t 142 | mono_context_get_id (MonoAppContext *context); 143 | 144 | MONO_API int32_t 145 | mono_context_get_domain_id (MonoAppContext *context); 146 | 147 | MONO_API MonoJitInfo * 148 | mono_jit_info_table_find (MonoDomain *domain, char *addr); 149 | 150 | /* MonoJitInfo accessors */ 151 | 152 | MONO_API void* 153 | mono_jit_info_get_code_start (MonoJitInfo* ji); 154 | 155 | MONO_API int 156 | mono_jit_info_get_code_size (MonoJitInfo* ji); 157 | 158 | MONO_API MonoMethod* 159 | mono_jit_info_get_method (MonoJitInfo* ji); 160 | 161 | 162 | MONO_API MonoImage* 163 | mono_get_corlib (void); 164 | 165 | MONO_API MonoClass* 166 | mono_get_object_class (void); 167 | 168 | MONO_API MonoClass* 169 | mono_get_byte_class (void); 170 | 171 | MONO_API MonoClass* 172 | mono_get_void_class (void); 173 | 174 | MONO_API MonoClass* 175 | mono_get_boolean_class (void); 176 | 177 | MONO_API MonoClass* 178 | mono_get_sbyte_class (void); 179 | 180 | MONO_API MonoClass* 181 | mono_get_int16_class (void); 182 | 183 | MONO_API MonoClass* 184 | mono_get_uint16_class (void); 185 | 186 | MONO_API MonoClass* 187 | mono_get_int32_class (void); 188 | 189 | MONO_API MonoClass* 190 | mono_get_uint32_class (void); 191 | 192 | MONO_API MonoClass* 193 | mono_get_intptr_class (void); 194 | 195 | MONO_API MonoClass* 196 | mono_get_uintptr_class (void); 197 | 198 | MONO_API MonoClass* 199 | mono_get_int64_class (void); 200 | 201 | MONO_API MonoClass* 202 | mono_get_uint64_class (void); 203 | 204 | MONO_API MonoClass* 205 | mono_get_single_class (void); 206 | 207 | MONO_API MonoClass* 208 | mono_get_double_class (void); 209 | 210 | MONO_API MonoClass* 211 | mono_get_char_class (void); 212 | 213 | MONO_API MonoClass* 214 | mono_get_string_class (void); 215 | 216 | MONO_API MonoClass* 217 | mono_get_enum_class (void); 218 | 219 | MONO_API MonoClass* 220 | mono_get_array_class (void); 221 | 222 | MONO_API MonoClass* 223 | mono_get_thread_class (void); 224 | 225 | MONO_API MonoClass* 226 | mono_get_exception_class (void); 227 | 228 | MONO_API void 229 | mono_security_enable_core_clr (void); 230 | 231 | typedef mono_bool (*MonoCoreClrPlatformCB) (const char *image_name); 232 | 233 | MONO_API void 234 | mono_security_set_core_clr_platform_callback (MonoCoreClrPlatformCB callback); 235 | 236 | MONO_END_DECLS 237 | 238 | #endif /* _MONO_METADATA_APPDOMAIN_H_ */ 239 | 240 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/assembly.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONONET_METADATA_ASSEMBLY_H_ 6 | #define _MONONET_METADATA_ASSEMBLY_H_ 7 | 8 | #include 9 | #include 10 | 11 | MONO_BEGIN_DECLS 12 | 13 | MONO_API void mono_assemblies_init (void); 14 | MONO_API void mono_assemblies_cleanup (void); 15 | MONO_RT_EXTERNAL_ONLY 16 | MONO_API MonoAssembly *mono_assembly_open (const char *filename, 17 | MonoImageOpenStatus *status); 18 | MONO_RT_EXTERNAL_ONLY 19 | MONO_API MonoAssembly *mono_assembly_open_full (const char *filename, 20 | MonoImageOpenStatus *status, 21 | mono_bool refonly); 22 | MONO_API MonoAssembly* mono_assembly_load (MonoAssemblyName *aname, 23 | const char *basedir, 24 | MonoImageOpenStatus *status); 25 | MONO_API MonoAssembly* mono_assembly_load_full (MonoAssemblyName *aname, 26 | const char *basedir, 27 | MonoImageOpenStatus *status, 28 | mono_bool refonly); 29 | MONO_API MonoAssembly* mono_assembly_load_from (MonoImage *image, const char *fname, 30 | MonoImageOpenStatus *status); 31 | MONO_API MonoAssembly* mono_assembly_load_from_full (MonoImage *image, const char *fname, 32 | MonoImageOpenStatus *status, 33 | mono_bool refonly); 34 | 35 | MONO_API MonoAssembly* mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status); 36 | 37 | MONO_API MonoAssembly* mono_assembly_loaded (MonoAssemblyName *aname); 38 | MONO_API MonoAssembly* mono_assembly_loaded_full (MonoAssemblyName *aname, mono_bool refonly); 39 | MONO_API void mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname); 40 | MONO_API void mono_assembly_load_reference (MonoImage *image, int index); 41 | MONO_API void mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status); 42 | MONO_RT_EXTERNAL_ONLY MONO_API MonoImage* mono_assembly_load_module (MonoAssembly *assembly, uint32_t idx); 43 | MONO_API void mono_assembly_close (MonoAssembly *assembly); 44 | MONO_API void mono_assembly_setrootdir (const char *root_dir); 45 | MONO_API MONO_CONST_RETURN char *mono_assembly_getrootdir (void); 46 | MONO_API char *mono_native_getrootdir (void); 47 | MONO_API void mono_assembly_foreach (MonoFunc func, void* user_data); 48 | MONO_API void mono_assembly_set_main (MonoAssembly *assembly); 49 | MONO_API MonoAssembly *mono_assembly_get_main (void); 50 | MONO_API MonoImage *mono_assembly_get_image (MonoAssembly *assembly); 51 | MONO_API MonoAssemblyName *mono_assembly_get_name (MonoAssembly *assembly); 52 | MONO_API mono_bool mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname); 53 | MONO_API mono_bool mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r); 54 | MONO_API char* mono_stringify_assembly_name (MonoAssemblyName *aname); 55 | 56 | /* Installs a function which is called each time a new assembly is loaded. */ 57 | typedef void (*MonoAssemblyLoadFunc) (MonoAssembly *assembly, void* user_data); 58 | MONO_API void mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data); 59 | 60 | /* 61 | * Installs a new function which is used to search the list of loaded 62 | * assemblies for a given assembly name. 63 | */ 64 | typedef MonoAssembly *(*MonoAssemblySearchFunc) (MonoAssemblyName *aname, void* user_data); 65 | MONO_API void mono_install_assembly_search_hook (MonoAssemblySearchFunc func, void* user_data); 66 | MONO_API void mono_install_assembly_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data); 67 | 68 | MONO_API MonoAssembly* mono_assembly_invoke_search_hook (MonoAssemblyName *aname); 69 | 70 | /* 71 | * Installs a new search function which is used as a last resort when loading 72 | * an assembly fails. This could invoke AssemblyResolve events. 73 | */ 74 | MONO_API void 75 | mono_install_assembly_postload_search_hook (MonoAssemblySearchFunc func, void* user_data); 76 | 77 | MONO_API void 78 | mono_install_assembly_postload_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data); 79 | 80 | 81 | /* Installs a function which is called before a new assembly is loaded 82 | * The hook are invoked from last hooked to first. If any of them returns 83 | * a non-null value, that will be the value returned in mono_assembly_load */ 84 | typedef MonoAssembly * (*MonoAssemblyPreLoadFunc) (MonoAssemblyName *aname, 85 | char **assemblies_path, 86 | void* user_data); 87 | 88 | MONO_API void mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func, 89 | void* user_data); 90 | MONO_API void mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func, 91 | void* user_data); 92 | 93 | MONO_API void mono_assembly_invoke_load_hook (MonoAssembly *ass); 94 | 95 | MONO_API MonoAssemblyName* mono_assembly_name_new (const char *name); 96 | MONO_API const char* mono_assembly_name_get_name (MonoAssemblyName *aname); 97 | MONO_API const char* mono_assembly_name_get_culture (MonoAssemblyName *aname); 98 | MONO_API uint16_t mono_assembly_name_get_version (MonoAssemblyName *aname, 99 | uint16_t *minor, uint16_t *build, uint16_t *revision); 100 | MONO_API mono_byte* mono_assembly_name_get_pubkeytoken (MonoAssemblyName *aname); 101 | MONO_API void mono_assembly_name_free (MonoAssemblyName *aname); 102 | 103 | typedef struct { 104 | const char *name; 105 | const unsigned char *data; 106 | const unsigned int size; 107 | } MonoBundledAssembly; 108 | 109 | MONO_API void mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies); 110 | MONO_API void mono_register_config_for_assembly (const char* assembly_name, const char* config_xml); 111 | MONO_API void mono_register_symfile_for_assembly (const char* assembly_name, const mono_byte *raw_contents, int size); 112 | MONO_API void mono_register_machine_config (const char *config_xml); 113 | 114 | MONO_API void mono_set_rootdir (void); 115 | MONO_API void mono_set_dirs (const char *assembly_dir, const char *config_dir); 116 | MONO_API void mono_set_assemblies_path (const char* path); 117 | MONO_END_DECLS 118 | 119 | #endif 120 | 121 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/blob.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Definitions used to pull information out of the Blob 4 | * 5 | */ 6 | #ifndef _MONO_METADATA_BLOB_H_ 7 | #define _MONO_METADATA_BLOB_H_ 8 | 9 | /* 10 | * Encoding for type signatures used in the Metadata 11 | */ 12 | typedef enum { 13 | MONO_TYPE_END = 0x00, /* End of List */ 14 | MONO_TYPE_VOID = 0x01, 15 | MONO_TYPE_BOOLEAN = 0x02, 16 | MONO_TYPE_CHAR = 0x03, 17 | MONO_TYPE_I1 = 0x04, 18 | MONO_TYPE_U1 = 0x05, 19 | MONO_TYPE_I2 = 0x06, 20 | MONO_TYPE_U2 = 0x07, 21 | MONO_TYPE_I4 = 0x08, 22 | MONO_TYPE_U4 = 0x09, 23 | MONO_TYPE_I8 = 0x0a, 24 | MONO_TYPE_U8 = 0x0b, 25 | MONO_TYPE_R4 = 0x0c, 26 | MONO_TYPE_R8 = 0x0d, 27 | MONO_TYPE_STRING = 0x0e, 28 | MONO_TYPE_PTR = 0x0f, /* arg: token */ 29 | MONO_TYPE_BYREF = 0x10, /* arg: token */ 30 | MONO_TYPE_VALUETYPE = 0x11, /* arg: token */ 31 | MONO_TYPE_CLASS = 0x12, /* arg: token */ 32 | MONO_TYPE_VAR = 0x13, /* number */ 33 | MONO_TYPE_ARRAY = 0x14, /* type, rank, boundsCount, bound1, loCount, lo1 */ 34 | MONO_TYPE_GENERICINST= 0x15, /* \x{2026} */ 35 | MONO_TYPE_TYPEDBYREF = 0x16, 36 | MONO_TYPE_I = 0x18, 37 | MONO_TYPE_U = 0x19, 38 | MONO_TYPE_FNPTR = 0x1b, /* arg: full method signature */ 39 | MONO_TYPE_OBJECT = 0x1c, 40 | MONO_TYPE_SZARRAY = 0x1d, /* 0-based one-dim-array */ 41 | MONO_TYPE_MVAR = 0x1e, /* number */ 42 | MONO_TYPE_CMOD_REQD = 0x1f, /* arg: typedef or typeref token */ 43 | MONO_TYPE_CMOD_OPT = 0x20, /* optional arg: typedef or typref token */ 44 | MONO_TYPE_INTERNAL = 0x21, /* CLR internal type */ 45 | 46 | MONO_TYPE_MODIFIER = 0x40, /* Or with the following types */ 47 | MONO_TYPE_SENTINEL = 0x41, /* Sentinel for varargs method signature */ 48 | MONO_TYPE_PINNED = 0x45, /* Local var that points to pinned object */ 49 | 50 | MONO_TYPE_ENUM = 0x55 /* an enumeration */ 51 | } MonoTypeEnum; 52 | 53 | typedef enum { 54 | MONO_TABLE_MODULE, 55 | MONO_TABLE_TYPEREF, 56 | MONO_TABLE_TYPEDEF, 57 | MONO_TABLE_FIELD_POINTER, 58 | MONO_TABLE_FIELD, 59 | MONO_TABLE_METHOD_POINTER, 60 | MONO_TABLE_METHOD, 61 | MONO_TABLE_PARAM_POINTER, 62 | MONO_TABLE_PARAM, 63 | MONO_TABLE_INTERFACEIMPL, 64 | MONO_TABLE_MEMBERREF, /* 0xa */ 65 | MONO_TABLE_CONSTANT, 66 | MONO_TABLE_CUSTOMATTRIBUTE, 67 | MONO_TABLE_FIELDMARSHAL, 68 | MONO_TABLE_DECLSECURITY, 69 | MONO_TABLE_CLASSLAYOUT, 70 | MONO_TABLE_FIELDLAYOUT, /* 0x10 */ 71 | MONO_TABLE_STANDALONESIG, 72 | MONO_TABLE_EVENTMAP, 73 | MONO_TABLE_EVENT_POINTER, 74 | MONO_TABLE_EVENT, 75 | MONO_TABLE_PROPERTYMAP, 76 | MONO_TABLE_PROPERTY_POINTER, 77 | MONO_TABLE_PROPERTY, 78 | MONO_TABLE_METHODSEMANTICS, 79 | MONO_TABLE_METHODIMPL, 80 | MONO_TABLE_MODULEREF, /* 0x1a */ 81 | MONO_TABLE_TYPESPEC, 82 | MONO_TABLE_IMPLMAP, 83 | MONO_TABLE_FIELDRVA, 84 | MONO_TABLE_UNUSED6, 85 | MONO_TABLE_UNUSED7, 86 | MONO_TABLE_ASSEMBLY, /* 0x20 */ 87 | MONO_TABLE_ASSEMBLYPROCESSOR, 88 | MONO_TABLE_ASSEMBLYOS, 89 | MONO_TABLE_ASSEMBLYREF, 90 | MONO_TABLE_ASSEMBLYREFPROCESSOR, 91 | MONO_TABLE_ASSEMBLYREFOS, 92 | MONO_TABLE_FILE, 93 | MONO_TABLE_EXPORTEDTYPE, 94 | MONO_TABLE_MANIFESTRESOURCE, 95 | MONO_TABLE_NESTEDCLASS, 96 | MONO_TABLE_GENERICPARAM, /* 0x2a */ 97 | MONO_TABLE_METHODSPEC, 98 | MONO_TABLE_GENERICPARAMCONSTRAINT, 99 | MONO_TABLE_UNUSED8, 100 | MONO_TABLE_UNUSED9, 101 | MONO_TABLE_UNUSED10, 102 | /* Portable PDB tables */ 103 | MONO_TABLE_DOCUMENT, /* 0x30 */ 104 | MONO_TABLE_METHODBODY, 105 | MONO_TABLE_LOCALSCOPE, 106 | MONO_TABLE_LOCALVARIABLE, 107 | MONO_TABLE_LOCALCONSTANT, 108 | MONO_TABLE_IMPORTSCOPE, 109 | MONO_TABLE_STATEMACHINEMETHOD, 110 | MONO_TABLE_CUSTOMDEBUGINFORMATION 111 | 112 | #define MONO_TABLE_LAST MONO_TABLE_CUSTOMDEBUGINFORMATION 113 | #define MONO_TABLE_NUM (MONO_TABLE_LAST + 1) 114 | 115 | } MonoMetaTableEnum; 116 | 117 | #endif 118 | 119 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/class.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONO_CLI_CLASS_H_ 6 | #define _MONO_CLI_CLASS_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | MONO_BEGIN_DECLS 14 | 15 | typedef struct MonoVTable MonoVTable; 16 | 17 | typedef struct _MonoClassField MonoClassField; 18 | typedef struct _MonoProperty MonoProperty; 19 | typedef struct _MonoEvent MonoEvent; 20 | 21 | MONO_API MonoClass * 22 | mono_class_get (MonoImage *image, uint32_t type_token); 23 | 24 | MONO_API MonoClass * 25 | mono_class_get_full (MonoImage *image, uint32_t type_token, MonoGenericContext *context); 26 | 27 | MONO_API mono_bool 28 | mono_class_init (MonoClass *klass); 29 | 30 | MONO_API MonoVTable * 31 | mono_class_vtable (MonoDomain *domain, MonoClass *klass); 32 | 33 | MONO_RT_EXTERNAL_ONLY MONO_API MonoClass * 34 | mono_class_from_name (MonoImage *image, const char* name_space, const char *name); 35 | 36 | MONO_RT_EXTERNAL_ONLY MONO_API MonoClass * 37 | mono_class_from_name_case (MonoImage *image, const char* name_space, const char *name); 38 | 39 | MONO_API MonoMethod * 40 | mono_class_get_method_from_name_flags (MonoClass *klass, const char *name, int param_count, int flags); 41 | 42 | MONO_API MonoClass * 43 | mono_class_from_typeref (MonoImage *image, uint32_t type_token); 44 | 45 | MONO_API MonoClass * 46 | mono_class_from_typeref_checked (MonoImage *image, uint32_t type_token, MonoError *error); 47 | 48 | MONO_API MonoClass * 49 | mono_class_from_generic_parameter (MonoGenericParam *param, MonoImage *image, mono_bool is_mvar); 50 | 51 | MONO_RT_EXTERNAL_ONLY MONO_API MonoType* 52 | mono_class_inflate_generic_type (MonoType *type, MonoGenericContext *context) /* MONO_DEPRECATED */; 53 | 54 | MONO_API MonoMethod* 55 | mono_class_inflate_generic_method (MonoMethod *method, MonoGenericContext *context); 56 | 57 | MONO_API MonoMethod * 58 | mono_get_inflated_method (MonoMethod *method); 59 | 60 | MONO_API MonoClassField* 61 | mono_field_from_token (MonoImage *image, uint32_t token, MonoClass **retklass, MonoGenericContext *context); 62 | 63 | MONO_API MonoClass * 64 | mono_bounded_array_class_get (MonoClass *element_class, uint32_t rank, mono_bool bounded); 65 | 66 | MONO_API MonoClass * 67 | mono_array_class_get (MonoClass *element_class, uint32_t rank); 68 | 69 | MONO_API MonoClass * 70 | mono_ptr_class_get (MonoType *type); 71 | 72 | MONO_API MonoClassField * 73 | mono_class_get_field (MonoClass *klass, uint32_t field_token); 74 | 75 | MONO_API MonoClassField * 76 | mono_class_get_field_from_name (MonoClass *klass, const char *name); 77 | 78 | MONO_API uint32_t 79 | mono_class_get_field_token (MonoClassField *field); 80 | 81 | MONO_API uint32_t 82 | mono_class_get_event_token (MonoEvent *event); 83 | 84 | MONO_API MonoProperty* 85 | mono_class_get_property_from_name (MonoClass *klass, const char *name); 86 | 87 | MONO_API uint32_t 88 | mono_class_get_property_token (MonoProperty *prop); 89 | 90 | MONO_API int32_t 91 | mono_array_element_size (MonoClass *ac); 92 | 93 | MONO_API int32_t 94 | mono_class_instance_size (MonoClass *klass); 95 | 96 | MONO_API int32_t 97 | mono_class_array_element_size (MonoClass *klass); 98 | 99 | MONO_API int32_t 100 | mono_class_data_size (MonoClass *klass); 101 | 102 | MONO_API int32_t 103 | mono_class_value_size (MonoClass *klass, uint32_t *align); 104 | 105 | MONO_API int32_t 106 | mono_class_min_align (MonoClass *klass); 107 | 108 | MONO_API MonoClass * 109 | mono_class_from_mono_type (MonoType *type); 110 | 111 | MONO_API mono_bool 112 | mono_class_is_subclass_of (MonoClass *klass, MonoClass *klassc, 113 | mono_bool check_interfaces); 114 | 115 | MONO_API mono_bool 116 | mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass); 117 | 118 | MONO_API void* 119 | mono_ldtoken (MonoImage *image, uint32_t token, MonoClass **retclass, MonoGenericContext *context); 120 | 121 | MONO_API char* 122 | mono_type_get_name (MonoType *type); 123 | 124 | MONO_API MonoType* 125 | mono_type_get_underlying_type (MonoType *type); 126 | 127 | /* MonoClass accessors */ 128 | MONO_API MonoImage* 129 | mono_class_get_image (MonoClass *klass); 130 | 131 | MONO_API MonoClass* 132 | mono_class_get_element_class (MonoClass *klass); 133 | 134 | MONO_API mono_bool 135 | mono_class_is_valuetype (MonoClass *klass); 136 | 137 | MONO_API mono_bool 138 | mono_class_is_enum (MonoClass *klass); 139 | 140 | MONO_API MonoType* 141 | mono_class_enum_basetype (MonoClass *klass); 142 | 143 | MONO_API MonoClass* 144 | mono_class_get_parent (MonoClass *klass); 145 | 146 | MONO_API MonoClass* 147 | mono_class_get_nesting_type (MonoClass *klass); 148 | 149 | MONO_API int 150 | mono_class_get_rank (MonoClass *klass); 151 | 152 | MONO_API uint32_t 153 | mono_class_get_flags (MonoClass *klass); 154 | 155 | MONO_API const char* 156 | mono_class_get_name (MonoClass *klass); 157 | 158 | MONO_API const char* 159 | mono_class_get_namespace (MonoClass *klass); 160 | 161 | MONO_API MonoType* 162 | mono_class_get_type (MonoClass *klass); 163 | 164 | MONO_API uint32_t 165 | mono_class_get_type_token (MonoClass *klass); 166 | 167 | MONO_API MonoType* 168 | mono_class_get_byref_type (MonoClass *klass); 169 | 170 | MONO_API int 171 | mono_class_num_fields (MonoClass *klass); 172 | 173 | MONO_API int 174 | mono_class_num_methods (MonoClass *klass); 175 | 176 | MONO_API int 177 | mono_class_num_properties (MonoClass *klass); 178 | 179 | MONO_API int 180 | mono_class_num_events (MonoClass *klass); 181 | 182 | MONO_API MonoClassField* 183 | mono_class_get_fields (MonoClass* klass, void **iter); 184 | 185 | MONO_API MonoMethod* 186 | mono_class_get_methods (MonoClass* klass, void **iter); 187 | 188 | MONO_API MonoProperty* 189 | mono_class_get_properties (MonoClass* klass, void **iter); 190 | 191 | MONO_API MonoEvent* 192 | mono_class_get_events (MonoClass* klass, void **iter); 193 | 194 | MONO_API MonoClass* 195 | mono_class_get_interfaces (MonoClass* klass, void **iter); 196 | 197 | MONO_API MonoClass* 198 | mono_class_get_nested_types (MonoClass* klass, void **iter); 199 | 200 | MONO_API mono_bool 201 | mono_class_is_delegate (MonoClass* klass); 202 | 203 | MONO_API mono_bool 204 | mono_class_implements_interface (MonoClass* klass, MonoClass* iface); 205 | 206 | /* MonoClassField accessors */ 207 | MONO_API const char* 208 | mono_field_get_name (MonoClassField *field); 209 | 210 | MONO_API MonoType* 211 | mono_field_get_type (MonoClassField *field); 212 | 213 | MONO_API MonoClass* 214 | mono_field_get_parent (MonoClassField *field); 215 | 216 | MONO_API uint32_t 217 | mono_field_get_flags (MonoClassField *field); 218 | 219 | MONO_API uint32_t 220 | mono_field_get_offset (MonoClassField *field); 221 | 222 | MONO_API const char * 223 | mono_field_get_data (MonoClassField *field); 224 | 225 | /* MonoProperty acessors */ 226 | MONO_API const char* 227 | mono_property_get_name (MonoProperty *prop); 228 | 229 | MONO_API MonoMethod* 230 | mono_property_get_set_method (MonoProperty *prop); 231 | 232 | MONO_API MonoMethod* 233 | mono_property_get_get_method (MonoProperty *prop); 234 | 235 | MONO_API MonoClass* 236 | mono_property_get_parent (MonoProperty *prop); 237 | 238 | MONO_API uint32_t 239 | mono_property_get_flags (MonoProperty *prop); 240 | 241 | /* MonoEvent accessors */ 242 | MONO_API const char* 243 | mono_event_get_name (MonoEvent *event); 244 | 245 | MONO_API MonoMethod* 246 | mono_event_get_add_method (MonoEvent *event); 247 | 248 | MONO_API MonoMethod* 249 | mono_event_get_remove_method (MonoEvent *event); 250 | 251 | MONO_API MonoMethod* 252 | mono_event_get_remove_method (MonoEvent *event); 253 | 254 | MONO_API MonoMethod* 255 | mono_event_get_raise_method (MonoEvent *event); 256 | 257 | MONO_API MonoClass* 258 | mono_event_get_parent (MonoEvent *event); 259 | 260 | MONO_API uint32_t 261 | mono_event_get_flags (MonoEvent *event); 262 | 263 | MONO_API MonoMethod * 264 | mono_class_get_method_from_name (MonoClass *klass, const char *name, int param_count); 265 | 266 | MONO_API char * 267 | mono_class_name_from_token (MonoImage *image, uint32_t type_token); 268 | 269 | MONO_API mono_bool 270 | mono_method_can_access_field (MonoMethod *method, MonoClassField *field); 271 | 272 | MONO_API mono_bool 273 | mono_method_can_access_method (MonoMethod *method, MonoMethod *called); 274 | 275 | MONO_END_DECLS 276 | 277 | #endif /* _MONO_CLI_CLASS_H_ */ 278 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/debug-helpers.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_DEBUG_HELPERS_H__ 6 | #define __MONO_DEBUG_HELPERS_H__ 7 | 8 | #include 9 | 10 | MONO_BEGIN_DECLS 11 | 12 | typedef struct MonoDisHelper MonoDisHelper; 13 | 14 | typedef char* (*MonoDisIndenter) (MonoDisHelper *dh, MonoMethod *method, uint32_t ip_offset); 15 | typedef char* (*MonoDisTokener) (MonoDisHelper *dh, MonoMethod *method, uint32_t token); 16 | 17 | struct MonoDisHelper { 18 | const char *newline; 19 | const char *label_format; 20 | const char *label_target; 21 | MonoDisIndenter indenter; 22 | MonoDisTokener tokener; 23 | void* user_data; 24 | }; 25 | 26 | MONO_API char* mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte** endp); 27 | MONO_API char* mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte* end); 28 | 29 | typedef struct MonoMethodDesc MonoMethodDesc; 30 | 31 | MONO_API char* mono_type_full_name (MonoType *type); 32 | 33 | MONO_API char* mono_signature_get_desc (MonoMethodSignature *sig, mono_bool include_namespace); 34 | 35 | MONO_API char* mono_context_get_desc (MonoGenericContext *context); 36 | 37 | MONO_API MonoMethodDesc* mono_method_desc_new (const char *name, mono_bool include_namespace); 38 | MONO_API MonoMethodDesc* mono_method_desc_from_method (MonoMethod *method); 39 | MONO_API void mono_method_desc_free (MonoMethodDesc *desc); 40 | MONO_API mono_bool mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method); 41 | MONO_API mono_bool mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method); 42 | MONO_API MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass); 43 | MONO_API MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image); 44 | 45 | MONO_API char* mono_method_full_name (MonoMethod *method, mono_bool signature); 46 | 47 | MONO_API char* mono_field_full_name (MonoClassField *field); 48 | 49 | MONO_END_DECLS 50 | 51 | #endif /* __MONO_DEBUG_HELPERS_H__ */ 52 | 53 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/debug-mono-symfile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * This header is only installed for use by the debugger: 4 | * the structures and the API declared here are not supported. 5 | * Copyright 2012 Xamarin Inc (http://www.xamarin.com) 6 | * Licensed under the MIT license. See LICENSE file in the project root for full license information. 7 | */ 8 | 9 | #ifndef __MONO_DEBUG_MONO_SYMFILE_H__ 10 | #define __MONO_DEBUG_MONO_SYMFILE_H__ 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | typedef struct MonoSymbolFileOffsetTable MonoSymbolFileOffsetTable; 19 | typedef struct MonoSymbolFileLineNumberEntry MonoSymbolFileLineNumberEntry; 20 | typedef struct MonoSymbolFileMethodAddress MonoSymbolFileMethodAddress; 21 | typedef struct MonoSymbolFileDynamicTable MonoSymbolFileDynamicTable; 22 | typedef struct MonoSymbolFileSourceEntry MonoSymbolFileSourceEntry; 23 | typedef struct MonoSymbolFileMethodEntry MonoSymbolFileMethodEntry; 24 | 25 | /* Keep in sync with OffsetTable in mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs */ 26 | struct MonoSymbolFileOffsetTable { 27 | uint32_t _total_file_size; 28 | uint32_t _data_section_offset; 29 | uint32_t _data_section_size; 30 | uint32_t _compile_unit_count; 31 | uint32_t _compile_unit_table_offset; 32 | uint32_t _compile_unit_table_size; 33 | uint32_t _source_count; 34 | uint32_t _source_table_offset; 35 | uint32_t _source_table_size; 36 | uint32_t _method_count; 37 | uint32_t _method_table_offset; 38 | uint32_t _method_table_size; 39 | uint32_t _type_count; 40 | uint32_t _anonymous_scope_count; 41 | uint32_t _anonymous_scope_table_offset; 42 | uint32_t _anonymous_scope_table_size; 43 | uint32_t _line_number_table_line_base; 44 | uint32_t _line_number_table_line_range; 45 | uint32_t _line_number_table_opcode_base; 46 | uint32_t _is_aspx_source; 47 | }; 48 | 49 | struct MonoSymbolFileSourceEntry { 50 | uint32_t _index; 51 | uint32_t _data_offset; 52 | }; 53 | 54 | struct MonoSymbolFileMethodEntry { 55 | uint32_t _token; 56 | uint32_t _data_offset; 57 | uint32_t _line_number_table; 58 | }; 59 | 60 | struct MonoSymbolFileMethodAddress { 61 | uint32_t size; 62 | const uint8_t *start_address; 63 | const uint8_t *end_address; 64 | const uint8_t *method_start_address; 65 | const uint8_t *method_end_address; 66 | const uint8_t *wrapper_address; 67 | uint32_t has_this; 68 | uint32_t num_params; 69 | uint32_t variable_table_offset; 70 | uint32_t type_table_offset; 71 | uint32_t num_line_numbers; 72 | uint32_t line_number_offset; 73 | uint8_t data [MONO_ZERO_LEN_ARRAY]; 74 | }; 75 | 76 | #define MONO_SYMBOL_FILE_MAJOR_VERSION 50 77 | #define MONO_SYMBOL_FILE_MINOR_VERSION 0 78 | #define MONO_SYMBOL_FILE_MAGIC 0x45e82623fd7fa614ULL 79 | 80 | MONO_BEGIN_DECLS 81 | 82 | MONO_API MonoSymbolFile * 83 | mono_debug_open_mono_symbols (MonoDebugHandle *handle, 84 | const uint8_t *raw_contents, 85 | int size, 86 | mono_bool in_the_debugger); 87 | 88 | MONO_API void 89 | mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile); 90 | 91 | MONO_API mono_bool 92 | mono_debug_symfile_is_loaded (MonoSymbolFile *symfile); 93 | 94 | MONO_API MonoDebugSourceLocation * 95 | mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, 96 | uint32_t offset); 97 | 98 | MONO_API void 99 | mono_debug_symfile_free_location (MonoDebugSourceLocation *location); 100 | 101 | MONO_API MonoDebugMethodInfo * 102 | mono_debug_symfile_lookup_method (MonoDebugHandle *handle, 103 | MonoMethod *method); 104 | 105 | MONO_API MonoDebugLocalsInfo* 106 | mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo); 107 | 108 | void 109 | mono_debug_symfile_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points); 110 | 111 | MONO_END_DECLS 112 | 113 | #endif /* __MONO_SYMFILE_H__ */ 114 | 115 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/environment.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * System.Environment support internal calls 4 | * 5 | * Author: 6 | * Dick Porter (dick@ximian.com) 7 | * 8 | * (C) 2002 Ximian, Inc 9 | */ 10 | 11 | #ifndef _MONO_METADATA_ENVIRONMENT_H_ 12 | #define _MONO_METADATA_ENVIRONMENT_H_ 13 | 14 | #include 15 | 16 | MONO_BEGIN_DECLS 17 | 18 | MONO_API extern int32_t mono_environment_exitcode_get (void); 19 | MONO_API extern void mono_environment_exitcode_set (int32_t value); 20 | 21 | MONO_END_DECLS 22 | 23 | #endif /* _MONO_METADATA_ENVIRONMENT_H_ */ 24 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/exception.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONO_METADATA_EXCEPTION_H_ 6 | #define _MONO_METADATA_EXCEPTION_H_ 7 | 8 | #include 9 | #include 10 | 11 | MONO_BEGIN_DECLS 12 | 13 | extern MONO_API MonoException * 14 | mono_exception_from_name (MonoImage *image, 15 | const char* name_space, 16 | const char *name); 17 | 18 | MONO_API MonoException * 19 | mono_exception_from_token (MonoImage *image, uint32_t token); 20 | 21 | MONO_RT_EXTERNAL_ONLY 22 | MONO_API MonoException * 23 | mono_exception_from_name_two_strings (MonoImage *image, const char *name_space, 24 | const char *name, MonoString *a1, MonoString *a2); 25 | 26 | MONO_API MonoException * 27 | mono_exception_from_name_msg (MonoImage *image, const char *name_space, 28 | const char *name, const char *msg); 29 | 30 | MONO_RT_EXTERNAL_ONLY 31 | MONO_API MonoException * 32 | mono_exception_from_token_two_strings (MonoImage *image, uint32_t token, 33 | MonoString *a1, MonoString *a2); 34 | 35 | extern MONO_API MonoException * 36 | mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image, 37 | const char* name_space, 38 | const char *name); 39 | 40 | MONO_API MonoException * 41 | mono_get_exception_divide_by_zero (void); 42 | 43 | MONO_API MonoException * 44 | mono_get_exception_security (void); 45 | 46 | MONO_API MonoException * 47 | mono_get_exception_arithmetic (void); 48 | 49 | MONO_API MonoException * 50 | mono_get_exception_overflow (void); 51 | 52 | MONO_API MonoException * 53 | mono_get_exception_null_reference (void); 54 | 55 | MONO_API MonoException * 56 | mono_get_exception_execution_engine (const char *msg); 57 | 58 | MONO_API MonoException * 59 | mono_get_exception_thread_abort (void); 60 | 61 | MONO_API MonoException * 62 | mono_get_exception_thread_state (const char *msg); 63 | 64 | MONO_API MonoException * 65 | mono_get_exception_thread_interrupted (void); 66 | 67 | MONO_API MonoException * 68 | mono_get_exception_serialization (const char *msg); 69 | 70 | MONO_API MonoException * 71 | mono_get_exception_invalid_cast (void); 72 | 73 | MONO_API MonoException * 74 | mono_get_exception_invalid_operation (const char *msg); 75 | 76 | MONO_API MonoException * 77 | mono_get_exception_index_out_of_range (void); 78 | 79 | MONO_API MonoException * 80 | mono_get_exception_array_type_mismatch (void); 81 | 82 | MONO_API MonoException * 83 | mono_get_exception_type_load (MonoString *class_name, char *assembly_name); 84 | 85 | MONO_API MonoException * 86 | mono_get_exception_missing_method (const char *class_name, const char *member_name); 87 | 88 | MONO_API MonoException * 89 | mono_get_exception_missing_field (const char *class_name, const char *member_name); 90 | 91 | MONO_API MonoException * 92 | mono_get_exception_not_implemented (const char *msg); 93 | 94 | MONO_API MonoException * 95 | mono_get_exception_not_supported (const char *msg); 96 | 97 | MONO_API MonoException* 98 | mono_get_exception_argument_null (const char *arg); 99 | 100 | MONO_API MonoException * 101 | mono_get_exception_argument (const char *arg, const char *msg); 102 | 103 | MONO_API MonoException * 104 | mono_get_exception_argument_out_of_range (const char *arg); 105 | 106 | MONO_API MonoException * 107 | mono_get_exception_io (const char *msg); 108 | 109 | MONO_API MonoException * 110 | mono_get_exception_file_not_found (MonoString *fname); 111 | 112 | MONO_RT_EXTERNAL_ONLY 113 | MONO_API MonoException * 114 | mono_get_exception_file_not_found2 (const char *msg, MonoString *fname); 115 | 116 | MONO_RT_EXTERNAL_ONLY 117 | MONO_API MonoException * 118 | mono_get_exception_type_initialization (const char *type_name, MonoException *inner); 119 | 120 | MONO_API MonoException * 121 | mono_get_exception_synchronization_lock (const char *msg); 122 | 123 | MONO_API MonoException * 124 | mono_get_exception_cannot_unload_appdomain (const char *msg); 125 | 126 | MONO_API MonoException * 127 | mono_get_exception_appdomain_unloaded (void); 128 | 129 | MONO_API MonoException * 130 | mono_get_exception_bad_image_format (const char *msg); 131 | 132 | MONO_RT_EXTERNAL_ONLY 133 | MONO_API MonoException * 134 | mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname); 135 | 136 | MONO_API MonoException * 137 | mono_get_exception_stack_overflow (void); 138 | 139 | MONO_API MonoException * 140 | mono_get_exception_out_of_memory (void); 141 | 142 | MONO_API MonoException * 143 | mono_get_exception_field_access (void); 144 | 145 | MONO_API MonoException * 146 | mono_get_exception_method_access (void); 147 | 148 | MONO_RT_EXTERNAL_ONLY 149 | MONO_API MonoException * 150 | mono_get_exception_reflection_type_load (MonoArray *types, MonoArray *exceptions); 151 | 152 | MONO_RT_EXTERNAL_ONLY 153 | MONO_API MonoException * 154 | mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception); 155 | 156 | /* Installs a function which is called when the runtime encounters an unhandled exception. 157 | * This hook isn't expected to return. 158 | * If no hook has been installed, the runtime will print a message before aborting. 159 | */ 160 | typedef void (*MonoUnhandledExceptionFunc) (MonoObject *exc, void *user_data); 161 | MONO_API void mono_install_unhandled_exception_hook (MonoUnhandledExceptionFunc func, void *user_data); 162 | void mono_invoke_unhandled_exception_hook (MonoObject *exc); 163 | 164 | MONO_END_DECLS 165 | 166 | #endif /* _MONO_METADATA_EXCEPTION_H_ */ 167 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/image.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONONET_METADATA_IMAGE_H_ 6 | #define _MONONET_METADATA_IMAGE_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | MONO_BEGIN_DECLS 13 | 14 | typedef struct _MonoImage MonoImage; 15 | typedef struct _MonoAssembly MonoAssembly; 16 | typedef struct _MonoAssemblyName MonoAssemblyName; 17 | typedef struct _MonoTableInfo MonoTableInfo; 18 | 19 | typedef enum { 20 | MONO_IMAGE_OK, 21 | MONO_IMAGE_ERROR_ERRNO, 22 | MONO_IMAGE_MISSING_ASSEMBLYREF, 23 | MONO_IMAGE_IMAGE_INVALID 24 | } MonoImageOpenStatus; 25 | 26 | MONO_API void mono_images_init (void); 27 | MONO_API void mono_images_cleanup (void); 28 | 29 | MONO_API MonoImage *mono_image_open (const char *fname, 30 | MonoImageOpenStatus *status); 31 | MONO_API MonoImage *mono_image_open_full (const char *fname, 32 | MonoImageOpenStatus *status, mono_bool refonly); 33 | MONO_API MonoImage *mono_pe_file_open (const char *fname, 34 | MonoImageOpenStatus *status); 35 | MONO_API MonoImage *mono_image_open_from_data (char *data, uint32_t data_len, mono_bool need_copy, 36 | MonoImageOpenStatus *status); 37 | MONO_API MonoImage *mono_image_open_from_data_full (char *data, uint32_t data_len, mono_bool need_copy, 38 | MonoImageOpenStatus *status, mono_bool refonly); 39 | MONO_API MonoImage *mono_image_open_from_data_with_name (char *data, uint32_t data_len, mono_bool need_copy, 40 | MonoImageOpenStatus *status, mono_bool refonly, const char *name); 41 | MONO_API void mono_image_fixup_vtable (MonoImage *image); 42 | MONO_API MonoImage *mono_image_loaded (const char *name); 43 | MONO_API MonoImage *mono_image_loaded_full (const char *name, mono_bool refonly); 44 | MONO_API MonoImage *mono_image_loaded_by_guid (const char *guid); 45 | MONO_API MonoImage *mono_image_loaded_by_guid_full (const char *guid, mono_bool refonly); 46 | MONO_API void mono_image_init (MonoImage *image); 47 | MONO_API void mono_image_close (MonoImage *image); 48 | MONO_API void mono_image_addref (MonoImage *image); 49 | MONO_API const char *mono_image_strerror (MonoImageOpenStatus status); 50 | 51 | MONO_API int mono_image_ensure_section (MonoImage *image, 52 | const char *section); 53 | MONO_API int mono_image_ensure_section_idx (MonoImage *image, 54 | int section); 55 | 56 | MONO_API uint32_t mono_image_get_entry_point (MonoImage *image); 57 | MONO_API const char *mono_image_get_resource (MonoImage *image, uint32_t offset, uint32_t *size); 58 | MONO_RT_EXTERNAL_ONLY MONO_API MonoImage* mono_image_load_file_for_image (MonoImage *image, int fileidx); 59 | 60 | MONO_RT_EXTERNAL_ONLY MONO_API MonoImage* mono_image_load_module (MonoImage *image, int idx); 61 | 62 | MONO_API const char* mono_image_get_name (MonoImage *image); 63 | MONO_API const char* mono_image_get_filename (MonoImage *image); 64 | MONO_API const char * mono_image_get_guid (MonoImage *image); 65 | MONO_API MonoAssembly* mono_image_get_assembly (MonoImage *image); 66 | MONO_API mono_bool mono_image_is_dynamic (MonoImage *image); 67 | MONO_API char* mono_image_rva_map (MonoImage *image, uint32_t rva); 68 | 69 | MONO_API const MonoTableInfo *mono_image_get_table_info (MonoImage *image, int table_id); 70 | MONO_API int mono_image_get_table_rows (MonoImage *image, int table_id); 71 | MONO_API int mono_table_info_get_rows (const MonoTableInfo *table); 72 | 73 | /* This actually returns a MonoPEResourceDataEntry *, but declaring it 74 | * causes an include file loop. 75 | */ 76 | MONO_API void* mono_image_lookup_resource (MonoImage *image, uint32_t res_id, 77 | uint32_t lang_id, mono_unichar2 *name); 78 | 79 | MONO_API const char* mono_image_get_public_key (MonoImage *image, uint32_t *size); 80 | MONO_API const char* mono_image_get_strong_name (MonoImage *image, uint32_t *size); 81 | MONO_API uint32_t mono_image_strong_name_position (MonoImage *image, uint32_t *size); 82 | MONO_API void mono_image_add_to_name_cache (MonoImage *image, 83 | const char *nspace, const char *name, uint32_t idx); 84 | MONO_API mono_bool mono_image_has_authenticode_entry (MonoImage *image); 85 | 86 | MONO_END_DECLS 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/loader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONO_METADATA_LOADER_H_ 6 | #define _MONO_METADATA_LOADER_H_ 1 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | MONO_BEGIN_DECLS 13 | 14 | typedef mono_bool (*MonoStackWalk) (MonoMethod *method, int32_t native_offset, int32_t il_offset, mono_bool managed, void* data); 15 | 16 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethod * 17 | mono_get_method (MonoImage *image, uint32_t token, MonoClass *klass); 18 | 19 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethod * 20 | mono_get_method_full (MonoImage *image, uint32_t token, MonoClass *klass, 21 | MonoGenericContext *context); 22 | 23 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethod * 24 | mono_get_method_constrained (MonoImage *image, uint32_t token, MonoClass *constrained_class, 25 | MonoGenericContext *context, MonoMethod **cil_method); 26 | 27 | MONO_API void 28 | mono_free_method (MonoMethod *method); 29 | 30 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethodSignature* 31 | mono_method_get_signature_full (MonoMethod *method, MonoImage *image, uint32_t token, 32 | MonoGenericContext *context); 33 | 34 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethodSignature* 35 | mono_method_get_signature (MonoMethod *method, MonoImage *image, uint32_t token); 36 | 37 | MONO_API MonoMethodSignature* 38 | mono_method_signature (MonoMethod *method); 39 | 40 | MONO_RT_EXTERNAL_ONLY MONO_API MonoMethodHeader* 41 | mono_method_get_header (MonoMethod *method); 42 | 43 | MONO_API const char* 44 | mono_method_get_name (MonoMethod *method); 45 | 46 | MONO_API MonoClass* 47 | mono_method_get_class (MonoMethod *method); 48 | 49 | MONO_API uint32_t 50 | mono_method_get_token (MonoMethod *method); 51 | 52 | MONO_API uint32_t 53 | mono_method_get_flags (MonoMethod *method, uint32_t *iflags); 54 | 55 | MONO_API uint32_t 56 | mono_method_get_index (MonoMethod *method); 57 | 58 | MONO_API void 59 | mono_add_internal_call (const char *name, const void* method); 60 | 61 | MONO_API void* 62 | mono_lookup_internal_call (MonoMethod *method); 63 | 64 | void* 65 | mono_lookup_internal_call_full (MonoMethod *method, mono_bool *uses_handles); 66 | 67 | MONO_API const char* 68 | mono_lookup_icall_symbol (MonoMethod *m); 69 | 70 | MONO_API void 71 | mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, const char *tdll, const char *tfunc); 72 | 73 | MONO_API void* 74 | mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char **exc_arg); 75 | 76 | MONO_API void 77 | mono_method_get_param_names (MonoMethod *method, const char **names); 78 | 79 | MONO_API uint32_t 80 | mono_method_get_param_token (MonoMethod *method, int idx); 81 | 82 | MONO_API void 83 | mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs); 84 | 85 | MONO_API mono_bool 86 | mono_method_has_marshal_info (MonoMethod *method); 87 | 88 | MONO_API MonoMethod* 89 | mono_method_get_last_managed (void); 90 | 91 | MONO_API void 92 | mono_stack_walk (MonoStackWalk func, void* user_data); 93 | 94 | /* Use this if the IL offset is not needed: it's faster */ 95 | MONO_API void 96 | mono_stack_walk_no_il (MonoStackWalk func, void* user_data); 97 | 98 | typedef mono_bool (*MonoStackWalkAsyncSafe) (MonoMethod *method, MonoDomain *domain, void *base_address, int offset, void* data); 99 | MONO_API void 100 | mono_stack_walk_async_safe (MonoStackWalkAsyncSafe func, void *initial_sig_context, void* user_data); 101 | 102 | MONO_API MonoMethodHeader* 103 | mono_method_get_header_checked (MonoMethod *method, MonoError *error); 104 | 105 | MONO_END_DECLS 106 | 107 | #endif 108 | 109 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/mono-config.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * 4 | * Author: Paolo Molaro (lupus@ximian.com) 5 | * 6 | * (C) 2002 Ximian, Inc. 7 | */ 8 | #ifndef __MONO_METADATA_CONFIG_H__ 9 | #define __MONO_METADATA_CONFIG_H__ 10 | 11 | #include 12 | #include 13 | 14 | MONO_BEGIN_DECLS 15 | 16 | MONO_API const char *mono_config_get_os (void); 17 | MONO_API const char *mono_config_get_cpu (void); 18 | MONO_API const char *mono_config_get_wordsize (void); 19 | 20 | MONO_API const char* mono_get_config_dir (void); 21 | MONO_API void mono_set_config_dir (const char *dir); 22 | 23 | MONO_API const char* mono_get_machine_config (void); 24 | 25 | MONO_API void mono_config_cleanup (void); 26 | MONO_API void mono_config_parse (const char *filename); 27 | MONO_API void mono_config_for_assembly (MonoImage *assembly); 28 | MONO_API void mono_config_parse_memory (const char *buffer); 29 | 30 | MONO_API const char* mono_config_string_for_assembly_file (const char *filename); 31 | 32 | MONO_API void mono_config_set_server_mode (mono_bool server_mode); 33 | MONO_API mono_bool mono_config_is_server_mode (void); 34 | 35 | MONO_END_DECLS 36 | 37 | #endif /* __MONO_METADATA_CONFIG_H__ */ 38 | 39 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/mono-debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * This header is only installed for use by the debugger: 4 | * the structures and the API declared here are not supported. 5 | */ 6 | 7 | #ifndef __MONO_DEBUG_H__ 8 | #define __MONO_DEBUG_H__ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | MONO_BEGIN_DECLS 15 | 16 | typedef struct _MonoSymbolTable MonoSymbolTable; 17 | typedef struct _MonoDebugDataTable MonoDebugDataTable; 18 | 19 | typedef struct _MonoSymbolFile MonoSymbolFile; 20 | typedef struct _MonoPPDBFile MonoPPDBFile; 21 | 22 | typedef struct _MonoDebugHandle MonoDebugHandle; 23 | 24 | typedef struct _MonoDebugLineNumberEntry MonoDebugLineNumberEntry; 25 | 26 | typedef struct _MonoDebugVarInfo MonoDebugVarInfo; 27 | typedef struct _MonoDebugMethodJitInfo MonoDebugMethodJitInfo; 28 | typedef struct _MonoDebugMethodAddress MonoDebugMethodAddress; 29 | typedef struct _MonoDebugMethodAddressList MonoDebugMethodAddressList; 30 | typedef struct _MonoDebugClassEntry MonoDebugClassEntry; 31 | 32 | typedef struct _MonoDebugMethodInfo MonoDebugMethodInfo; 33 | typedef struct _MonoDebugLocalsInfo MonoDebugLocalsInfo; 34 | typedef struct _MonoDebugMethodAsyncInfo MonoDebugMethodAsyncInfo; 35 | typedef struct _MonoDebugSourceLocation MonoDebugSourceLocation; 36 | 37 | typedef struct _MonoDebugList MonoDebugList; 38 | 39 | typedef enum { 40 | MONO_DEBUG_FORMAT_NONE, 41 | MONO_DEBUG_FORMAT_MONO, 42 | /* Deprecated, the mdb debugger is not longer supported. */ 43 | MONO_DEBUG_FORMAT_DEBUGGER 44 | } MonoDebugFormat; 45 | 46 | /* 47 | * NOTE: 48 | * We intentionally do not use GList here since the debugger needs to know about 49 | * the layout of the fields. 50 | */ 51 | struct _MonoDebugList { 52 | MonoDebugList *next; 53 | const void* data; 54 | }; 55 | 56 | struct _MonoSymbolTable { 57 | uint64_t magic; 58 | uint32_t version; 59 | uint32_t total_size; 60 | 61 | /* 62 | * Corlib and metadata info. 63 | */ 64 | MonoDebugHandle *corlib; 65 | MonoDebugDataTable *global_data_table; 66 | MonoDebugList *data_tables; 67 | 68 | /* 69 | * The symbol files. 70 | */ 71 | MonoDebugList *symbol_files; 72 | }; 73 | 74 | struct _MonoDebugHandle { 75 | uint32_t index; 76 | char *image_file; 77 | MonoImage *image; 78 | MonoDebugDataTable *type_table; 79 | MonoSymbolFile *symfile; 80 | MonoPPDBFile *ppdb; 81 | }; 82 | 83 | struct _MonoDebugMethodJitInfo { 84 | const mono_byte *code_start; 85 | uint32_t code_size; 86 | uint32_t prologue_end; 87 | uint32_t epilogue_begin; 88 | const mono_byte *wrapper_addr; 89 | uint32_t num_line_numbers; 90 | MonoDebugLineNumberEntry *line_numbers; 91 | uint32_t has_var_info; 92 | uint32_t num_params; 93 | MonoDebugVarInfo *this_var; 94 | MonoDebugVarInfo *params; 95 | uint32_t num_locals; 96 | MonoDebugVarInfo *locals; 97 | MonoDebugVarInfo *gsharedvt_info_var; 98 | MonoDebugVarInfo *gsharedvt_locals_var; 99 | }; 100 | 101 | struct _MonoDebugMethodAddressList { 102 | uint32_t size; 103 | uint32_t count; 104 | mono_byte data [MONO_ZERO_LEN_ARRAY]; 105 | }; 106 | 107 | struct _MonoDebugSourceLocation { 108 | char *source_file; 109 | uint32_t row, column; 110 | uint32_t il_offset; 111 | }; 112 | 113 | MONO_API mono_bool mono_debug_enabled (void); 114 | 115 | /* 116 | * These bits of the MonoDebugLocalInfo's "index" field are flags specifying 117 | * where the variable is actually stored. 118 | * 119 | * See relocate_variable() in debug-symfile.c for more info. 120 | */ 121 | #define MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS 0xf0000000 122 | 123 | /* The variable is in register "index". */ 124 | #define MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER 0 125 | 126 | /* The variable is at offset "offset" from register "index". */ 127 | #define MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET 0x10000000 128 | 129 | /* The variable is in the two registers "offset" and "index". */ 130 | #define MONO_DEBUG_VAR_ADDRESS_MODE_TWO_REGISTERS 0x20000000 131 | 132 | /* The variable is dead. */ 133 | #define MONO_DEBUG_VAR_ADDRESS_MODE_DEAD 0x30000000 134 | 135 | /* Same as REGOFFSET, but do an indirection */ 136 | #define MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR 0x40000000 137 | 138 | /* gsharedvt local */ 139 | #define MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL 0x50000000 140 | 141 | /* variable is a vt address */ 142 | #define MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR 0x60000000 143 | 144 | struct _MonoDebugVarInfo { 145 | uint32_t index; 146 | uint32_t offset; 147 | uint32_t size; 148 | uint32_t begin_scope; 149 | uint32_t end_scope; 150 | MonoType *type; 151 | }; 152 | 153 | #define MONO_DEBUGGER_MAJOR_VERSION 81 154 | #define MONO_DEBUGGER_MINOR_VERSION 6 155 | #define MONO_DEBUGGER_MAGIC 0x7aff65af4253d427ULL 156 | 157 | MONO_API void mono_debug_init (MonoDebugFormat format); 158 | MONO_API void mono_debug_open_image_from_memory (MonoImage *image, const mono_byte *raw_contents, int size); 159 | MONO_API void mono_debug_cleanup (void); 160 | 161 | MONO_API void mono_debug_close_image (MonoImage *image); 162 | 163 | MONO_API void mono_debug_domain_unload (MonoDomain *domain); 164 | MONO_API void mono_debug_domain_create (MonoDomain *domain); 165 | 166 | MONO_API MonoDebugMethodAddress * 167 | mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDomain *domain); 168 | 169 | MONO_API void 170 | mono_debug_remove_method (MonoMethod *method, MonoDomain *domain); 171 | 172 | MONO_API MonoDebugMethodInfo * 173 | mono_debug_lookup_method (MonoMethod *method); 174 | 175 | MONO_API MonoDebugMethodAddressList * 176 | mono_debug_lookup_method_addresses (MonoMethod *method); 177 | 178 | MONO_API MonoDebugMethodJitInfo* 179 | mono_debug_find_method (MonoMethod *method, MonoDomain *domain); 180 | 181 | MONO_API void 182 | mono_debug_free_method_jit_info (MonoDebugMethodJitInfo *jit); 183 | 184 | 185 | MONO_API void 186 | mono_debug_add_delegate_trampoline (void* code, int size); 187 | 188 | MONO_API MonoDebugLocalsInfo* 189 | mono_debug_lookup_locals (MonoMethod *method); 190 | 191 | MonoDebugMethodAsyncInfo* 192 | mono_debug_lookup_method_async_debug_info (MonoMethod *method); 193 | 194 | MonoDebugSourceLocation * 195 | mono_debug_method_lookup_location (MonoDebugMethodInfo *minfo, int il_offset); 196 | 197 | /* 198 | * Line number support. 199 | */ 200 | 201 | MONO_API MonoDebugSourceLocation * 202 | mono_debug_lookup_source_location (MonoMethod *method, uint32_t address, MonoDomain *domain); 203 | 204 | MONO_API int32_t 205 | mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, uint32_t native_offset); 206 | 207 | MONO_API void 208 | mono_debug_free_source_location (MonoDebugSourceLocation *location); 209 | 210 | MONO_API char * 211 | mono_debug_print_stack_frame (MonoMethod *method, uint32_t native_offset, MonoDomain *domain); 212 | 213 | /* 214 | * Mono Debugger support functions 215 | * 216 | * These methods are used by the JIT while running inside the Mono Debugger. 217 | */ 218 | 219 | MONO_API int mono_debugger_method_has_breakpoint (MonoMethod *method); 220 | MONO_API int mono_debugger_insert_breakpoint (const char *method_name, mono_bool include_namespace); 221 | 222 | MONO_API void mono_set_is_debugger_attached (mono_bool attached); 223 | MONO_API mono_bool mono_is_debugger_attached (void); 224 | 225 | MONO_END_DECLS 226 | 227 | #endif /* __MONO_DEBUG_H__ */ 228 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/mono-gc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * GC related public interface 4 | * 5 | */ 6 | #ifndef __METADATA_MONO_GC_H__ 7 | #define __METADATA_MONO_GC_H__ 8 | 9 | #include 10 | 11 | MONO_BEGIN_DECLS 12 | 13 | typedef int (*MonoGCReferences) (MonoObject *obj, MonoClass *klass, uintptr_t size, uintptr_t num, MonoObject **refs, uintptr_t *offsets, void *data); 14 | 15 | typedef enum { 16 | // Roots external to Mono. Embedders may only use this value. 17 | MONO_ROOT_SOURCE_EXTERNAL = 0, 18 | // Thread stack. Must not be used to register roots. 19 | MONO_ROOT_SOURCE_STACK = 1, 20 | // Roots in the finalizer queue. Must not be used to register roots. 21 | MONO_ROOT_SOURCE_FINALIZER_QUEUE = 2, 22 | // Managed static variables. 23 | MONO_ROOT_SOURCE_STATIC = 3, 24 | // Static variables with ThreadStaticAttribute. 25 | MONO_ROOT_SOURCE_THREAD_STATIC = 4, 26 | // Static variables with ContextStaticAttribute. 27 | MONO_ROOT_SOURCE_CONTEXT_STATIC = 5, 28 | // GCHandle structures. 29 | MONO_ROOT_SOURCE_GC_HANDLE = 6, 30 | // Roots in the just-in-time compiler. 31 | MONO_ROOT_SOURCE_JIT = 7, 32 | // Roots in the threading subsystem. 33 | MONO_ROOT_SOURCE_THREADING = 8, 34 | // Roots in application domains. 35 | MONO_ROOT_SOURCE_DOMAIN = 9, 36 | // Roots in reflection code. 37 | MONO_ROOT_SOURCE_REFLECTION = 10, 38 | // Roots from P/Invoke or other marshaling. 39 | MONO_ROOT_SOURCE_MARSHAL = 11, 40 | // Roots in the thread pool data structures. 41 | MONO_ROOT_SOURCE_THREAD_POOL = 12, 42 | // Roots in the debugger agent. 43 | MONO_ROOT_SOURCE_DEBUGGER = 13, 44 | // Handle structures, used for object passed to internal functions 45 | MONO_ROOT_SOURCE_HANDLE = 14, 46 | } MonoGCRootSource; 47 | 48 | MONO_API void mono_gc_collect (int generation); 49 | MONO_API int mono_gc_max_generation (void); 50 | MONO_API int mono_gc_get_generation (MonoObject *object); 51 | MONO_API int mono_gc_collection_count (int generation); 52 | MONO_API int64_t mono_gc_get_used_size (void); 53 | MONO_API int64_t mono_gc_get_heap_size (void); 54 | MONO_API MonoBoolean mono_gc_pending_finalizers (void); 55 | MONO_API void mono_gc_finalize_notify (void); 56 | MONO_API int mono_gc_invoke_finalizers (void); 57 | /* heap walking is only valid in the pre-stop-world event callback */ 58 | MONO_API int mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data); 59 | 60 | MONO_END_DECLS 61 | 62 | #endif /* __METADATA_MONO_GC_H__ */ 63 | 64 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/opcodes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_METADATA_OPCODES_H__ 6 | #define __MONO_METADATA_OPCODES_H__ 7 | 8 | /* 9 | * opcodes.h: CIL instruction information 10 | * 11 | * Author: 12 | * Paolo Molaro (lupus@ximian.com) 13 | * 14 | * (C) 2002 Ximian, Inc. 15 | */ 16 | 17 | #include 18 | 19 | MONO_BEGIN_DECLS 20 | 21 | #define MONO_CUSTOM_PREFIX 0xf0 22 | 23 | #define OPDEF(a,b,c,d,e,f,g,h,i,j) \ 24 | MONO_ ## a, 25 | 26 | typedef enum { 27 | #include "mono/cil/opcode.def" 28 | MONO_CEE_LAST 29 | } MonoOpcodeEnum; 30 | 31 | #undef OPDEF 32 | 33 | enum { 34 | MONO_FLOW_NEXT, 35 | MONO_FLOW_BRANCH, 36 | MONO_FLOW_COND_BRANCH, 37 | MONO_FLOW_ERROR, 38 | MONO_FLOW_CALL, 39 | MONO_FLOW_RETURN, 40 | MONO_FLOW_META 41 | }; 42 | 43 | enum { 44 | MonoInlineNone, 45 | MonoInlineType, 46 | MonoInlineField, 47 | MonoInlineMethod, 48 | MonoInlineTok, 49 | MonoInlineString, 50 | MonoInlineSig, 51 | MonoInlineVar, 52 | MonoShortInlineVar, 53 | MonoInlineBrTarget, 54 | MonoShortInlineBrTarget, 55 | MonoInlineSwitch, 56 | MonoInlineR, 57 | MonoShortInlineR, 58 | MonoInlineI, 59 | MonoShortInlineI, 60 | MonoInlineI8 61 | }; 62 | 63 | typedef struct { 64 | unsigned char argument; 65 | unsigned char flow_type; 66 | unsigned short opval; 67 | } MonoOpcode; 68 | 69 | MONO_API extern const MonoOpcode mono_opcodes []; 70 | 71 | MONO_API const char* 72 | mono_opcode_name (int opcode); 73 | 74 | MONO_API MonoOpcodeEnum 75 | mono_opcode_value (const mono_byte **ip, const mono_byte *end); 76 | 77 | MONO_END_DECLS 78 | 79 | #endif /* __MONO_METADATA_OPCODES_H__ */ 80 | 81 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/reflection.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __METADATA_REFLECTION_H__ 6 | #define __METADATA_REFLECTION_H__ 7 | 8 | #include 9 | #include 10 | 11 | MONO_BEGIN_DECLS 12 | 13 | typedef struct MonoTypeNameParse MonoTypeNameParse; 14 | 15 | typedef struct { 16 | MonoMethod *ctor; 17 | uint32_t data_size; 18 | const mono_byte* data; 19 | } MonoCustomAttrEntry; 20 | 21 | typedef struct { 22 | int num_attrs; 23 | int cached; 24 | MonoImage *image; 25 | MonoCustomAttrEntry attrs [MONO_ZERO_LEN_ARRAY]; 26 | } MonoCustomAttrInfo; 27 | 28 | #define MONO_SIZEOF_CUSTOM_ATTR_INFO (offsetof (MonoCustomAttrInfo, attrs)) 29 | 30 | /* 31 | * Information which isn't in the MonoMethod structure is stored here for 32 | * dynamic methods. 33 | */ 34 | typedef struct { 35 | char **param_names; 36 | MonoMarshalSpec **param_marshall; 37 | MonoCustomAttrInfo **param_cattr; 38 | uint8_t** param_defaults; 39 | uint32_t *param_default_types; 40 | char *dllentry, *dll; 41 | } MonoReflectionMethodAux; 42 | 43 | typedef enum { 44 | ResolveTokenError_OutOfRange, 45 | ResolveTokenError_BadTable, 46 | ResolveTokenError_Other 47 | } MonoResolveTokenError; 48 | 49 | MONO_API int mono_reflection_parse_type (char *name, MonoTypeNameParse *info); 50 | MONO_RT_EXTERNAL_ONLY 51 | MONO_API MonoType* mono_reflection_get_type (MonoImage* image, MonoTypeNameParse *info, mono_bool ignorecase, mono_bool *type_resolve); 52 | MONO_API void mono_reflection_free_type_info (MonoTypeNameParse *info); 53 | MONO_RT_EXTERNAL_ONLY 54 | MONO_API MonoType* mono_reflection_type_from_name (char *name, MonoImage *image); 55 | MONO_RT_EXTERNAL_ONLY 56 | MONO_API uint32_t mono_reflection_get_token (MonoObject *obj); 57 | 58 | MONO_RT_EXTERNAL_ONLY 59 | MONO_API MonoReflectionAssembly* mono_assembly_get_object (MonoDomain *domain, MonoAssembly *assembly); 60 | MONO_RT_EXTERNAL_ONLY 61 | MONO_API MonoReflectionModule* mono_module_get_object (MonoDomain *domain, MonoImage *image); 62 | MONO_RT_EXTERNAL_ONLY 63 | MONO_API MonoReflectionModule* mono_module_file_get_object (MonoDomain *domain, MonoImage *image, int table_index); 64 | MONO_API MonoReflectionType* mono_type_get_object (MonoDomain *domain, MonoType *type); 65 | MONO_RT_EXTERNAL_ONLY 66 | MONO_API MonoReflectionMethod* mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refclass); 67 | MONO_RT_EXTERNAL_ONLY 68 | MONO_API MonoReflectionField* mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *field); 69 | MONO_RT_EXTERNAL_ONLY 70 | MONO_API MonoReflectionProperty* mono_property_get_object (MonoDomain *domain, MonoClass *klass, MonoProperty *property); 71 | MONO_RT_EXTERNAL_ONLY 72 | MONO_API MonoReflectionEvent* mono_event_get_object (MonoDomain *domain, MonoClass *klass, MonoEvent *event); 73 | /* note: this one is slightly different: we keep the whole array of params in the cache */ 74 | MONO_RT_EXTERNAL_ONLY 75 | MONO_API MonoArray* mono_param_get_objects (MonoDomain *domain, MonoMethod *method); 76 | MONO_RT_EXTERNAL_ONLY 77 | MONO_API MonoReflectionMethodBody* mono_method_body_get_object (MonoDomain *domain, MonoMethod *method); 78 | 79 | MONO_API MonoObject *mono_get_dbnull_object (MonoDomain *domain); 80 | 81 | MONO_API MonoArray* mono_reflection_get_custom_attrs_by_type (MonoObject *obj, MonoClass *attr_klass, MonoError *error); 82 | MONO_API MonoArray* mono_reflection_get_custom_attrs (MonoObject *obj); 83 | MONO_RT_EXTERNAL_ONLY 84 | MONO_API MonoArray* mono_reflection_get_custom_attrs_data (MonoObject *obj); 85 | MONO_RT_EXTERNAL_ONLY 86 | MONO_API MonoArray* mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *porpValues, MonoArray *fields, MonoArray* fieldValues); 87 | 88 | MONO_RT_EXTERNAL_ONLY 89 | MONO_API MonoCustomAttrInfo* mono_reflection_get_custom_attrs_info (MonoObject *obj); 90 | MONO_RT_EXTERNAL_ONLY 91 | MONO_API MonoArray* mono_custom_attrs_construct (MonoCustomAttrInfo *cinfo); 92 | MONO_RT_EXTERNAL_ONLY 93 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_index (MonoImage *image, uint32_t idx); 94 | MONO_RT_EXTERNAL_ONLY 95 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_method (MonoMethod *method); 96 | MONO_RT_EXTERNAL_ONLY 97 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_class (MonoClass *klass); 98 | MONO_RT_EXTERNAL_ONLY 99 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_assembly (MonoAssembly *assembly); 100 | MONO_RT_EXTERNAL_ONLY 101 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property); 102 | MONO_RT_EXTERNAL_ONLY 103 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event); 104 | MONO_RT_EXTERNAL_ONLY 105 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field); 106 | MONO_RT_EXTERNAL_ONLY 107 | MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_param (MonoMethod *method, uint32_t param); 108 | MONO_API mono_bool mono_custom_attrs_has_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass); 109 | MONO_RT_EXTERNAL_ONLY 110 | MONO_API MonoObject* mono_custom_attrs_get_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass); 111 | MONO_API void mono_custom_attrs_free (MonoCustomAttrInfo *ainfo); 112 | 113 | 114 | #define MONO_DECLSEC_ACTION_MIN 0x1 115 | #define MONO_DECLSEC_ACTION_MAX 0x12 116 | 117 | enum { 118 | MONO_DECLSEC_FLAG_REQUEST = 0x00000001, 119 | MONO_DECLSEC_FLAG_DEMAND = 0x00000002, 120 | MONO_DECLSEC_FLAG_ASSERT = 0x00000004, 121 | MONO_DECLSEC_FLAG_DENY = 0x00000008, 122 | MONO_DECLSEC_FLAG_PERMITONLY = 0x00000010, 123 | MONO_DECLSEC_FLAG_LINKDEMAND = 0x00000020, 124 | MONO_DECLSEC_FLAG_INHERITANCEDEMAND = 0x00000040, 125 | MONO_DECLSEC_FLAG_REQUEST_MINIMUM = 0x00000080, 126 | MONO_DECLSEC_FLAG_REQUEST_OPTIONAL = 0x00000100, 127 | MONO_DECLSEC_FLAG_REQUEST_REFUSE = 0x00000200, 128 | MONO_DECLSEC_FLAG_PREJIT_GRANT = 0x00000400, 129 | MONO_DECLSEC_FLAG_PREJIT_DENY = 0x00000800, 130 | MONO_DECLSEC_FLAG_NONCAS_DEMAND = 0x00001000, 131 | MONO_DECLSEC_FLAG_NONCAS_LINKDEMAND = 0x00002000, 132 | MONO_DECLSEC_FLAG_NONCAS_INHERITANCEDEMAND = 0x00004000, 133 | MONO_DECLSEC_FLAG_LINKDEMAND_CHOICE = 0x00008000, 134 | MONO_DECLSEC_FLAG_INHERITANCEDEMAND_CHOICE = 0x00010000, 135 | MONO_DECLSEC_FLAG_DEMAND_CHOICE = 0x00020000 136 | }; 137 | 138 | MONO_API uint32_t mono_declsec_flags_from_method (MonoMethod *method); 139 | MONO_API uint32_t mono_declsec_flags_from_class (MonoClass *klass); 140 | MONO_API uint32_t mono_declsec_flags_from_assembly (MonoAssembly *assembly); 141 | 142 | /* this structure MUST be kept in synch with RuntimeDeclSecurityEntry 143 | * located in /mcs/class/corlib/System.Security/SecurityFrame.cs */ 144 | typedef struct { 145 | char *blob; /* pointer to metadata blob */ 146 | uint32_t size; /* size of the metadata blob */ 147 | uint32_t index; 148 | } MonoDeclSecurityEntry; 149 | 150 | typedef struct { 151 | MonoDeclSecurityEntry demand; 152 | MonoDeclSecurityEntry noncasdemand; 153 | MonoDeclSecurityEntry demandchoice; 154 | } MonoDeclSecurityActions; 155 | 156 | MONO_API MonoBoolean mono_declsec_get_demands (MonoMethod *callee, MonoDeclSecurityActions* demands); 157 | MONO_API MonoBoolean mono_declsec_get_linkdemands (MonoMethod *callee, MonoDeclSecurityActions* klass, MonoDeclSecurityActions* cmethod); 158 | MONO_API MonoBoolean mono_declsec_get_inheritdemands_class (MonoClass *klass, MonoDeclSecurityActions* demands); 159 | MONO_API MonoBoolean mono_declsec_get_inheritdemands_method (MonoMethod *callee, MonoDeclSecurityActions* demands); 160 | 161 | MONO_API MonoBoolean mono_declsec_get_method_action (MonoMethod *method, uint32_t action, MonoDeclSecurityEntry *entry); 162 | MONO_API MonoBoolean mono_declsec_get_class_action (MonoClass *klass, uint32_t action, MonoDeclSecurityEntry *entry); 163 | MONO_API MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, uint32_t action, MonoDeclSecurityEntry *entry); 164 | 165 | MONO_API MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype); 166 | 167 | MONO_API MonoAssembly* mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly); 168 | 169 | MONO_END_DECLS 170 | 171 | #endif /* __METADATA_REFLECTION_H__ */ 172 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/sgen-bridge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Copyright 2011 Novell, Inc. 4 | * 5 | * Licensed under the MIT license. See LICENSE file in the project root for full license information. 6 | */ 7 | 8 | /* 9 | * The bridge is a mechanism for SGen to let clients override the death of some 10 | * unreachable objects. We use it in monodroid to do garbage collection across 11 | * the Mono and Java heaps. 12 | * 13 | * The client (Monodroid) can designate some objects as "bridged", which means 14 | * that they participate in the bridge processing step once SGen considers them 15 | * unreachable, i.e., dead. Bridged objects must be registered for 16 | * finalization. 17 | * 18 | * When SGen is done marking, it puts together a list of all dead bridged 19 | * objects. This is passed to the bridge processor, which does an analysis to 20 | * simplify the graph: It replaces strongly-connected components with single 21 | * nodes, and may remove nodes corresponding to components which do not contain 22 | * bridged objects. 23 | * 24 | * The output of the SCC analysis is passed to the client's `cross_references()` 25 | * callback. This consists of 2 arrays, an array of SCCs (MonoGCBridgeSCC), 26 | * and an array of "xrefs" (edges between SCCs, MonoGCBridgeXRef). Edges are 27 | * encoded as pairs of "API indices", ie indexes in the SCC array. The client 28 | * is expected to set the `is_alive` flag on those strongly connected components 29 | * that it wishes to be kept alive. 30 | * 31 | * In monodroid each bridged object has a corresponding Java mirror object. In 32 | * the bridge callback it reifies the Mono object graph in the Java heap so that 33 | * the full, combined object graph is now instantiated on the Java side. Then 34 | * it triggers a Java GC, waits for it to finish, and checks which of the Java 35 | * mirror objects are still alive. For those it sets the `is_alive` flag and 36 | * returns from the callback. 37 | * 38 | * The SCC analysis is done while the world is stopped, but the callback is made 39 | * with the world running again. Weak links to bridged objects and other 40 | * objects reachable from them are kept until the callback returns, at which 41 | * point all links to bridged objects that don't have `is_alive` set are nulled. 42 | * Note that weak links to non-bridged objects reachable from bridged objects 43 | * are not nulled. This might be considered a bug. 44 | * 45 | * There are three different implementations of the bridge processor, each of 46 | * which implements 8 callbacks (see SgenBridgeProcessor). The implementations 47 | * differ in the algorithm they use to compute the "simplified" SCC graph. 48 | */ 49 | 50 | #ifndef _MONO_SGEN_BRIDGE_H_ 51 | #define _MONO_SGEN_BRIDGE_H_ 52 | 53 | #include 54 | 55 | MONO_BEGIN_DECLS 56 | 57 | enum { 58 | SGEN_BRIDGE_VERSION = 5 59 | }; 60 | 61 | typedef enum { 62 | /* Instances of this class should be scanned when computing the transitive dependency among bridges. E.g. List*/ 63 | GC_BRIDGE_TRANSPARENT_CLASS, 64 | /* Instances of this class should not be scanned when computing the transitive dependency among bridges. E.g. String*/ 65 | GC_BRIDGE_OPAQUE_CLASS, 66 | /* Instances of this class should be bridged and have their dependency computed. */ 67 | GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS, 68 | /* Instances of this class should be bridged but no dependencies should not be calculated. */ 69 | GC_BRIDGE_OPAQUE_BRIDGE_CLASS, 70 | } MonoGCBridgeObjectKind; 71 | 72 | typedef struct { 73 | mono_bool is_alive; /* to be set by the cross reference callback */ 74 | int num_objs; 75 | MonoObject *objs [MONO_ZERO_LEN_ARRAY]; 76 | } MonoGCBridgeSCC; 77 | 78 | typedef struct { 79 | int src_scc_index; 80 | int dst_scc_index; 81 | } MonoGCBridgeXRef; 82 | 83 | typedef struct { 84 | int bridge_version; 85 | /* 86 | * Tells the runtime which classes to even consider when looking for 87 | * bridged objects. If subclasses are to be considered as well, the 88 | * subclass check must be done in the callback. 89 | */ 90 | MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *klass); 91 | /* 92 | * This is only called on objects for whose classes 93 | * `bridge_class_kind()` returned `XXX_BRIDGE_CLASS`. 94 | */ 95 | mono_bool (*is_bridge_object) (MonoObject *object); 96 | void (*cross_references) (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs); 97 | } MonoGCBridgeCallbacks; 98 | 99 | /* 100 | * Note: This may be called at any time, but cannot be called concurrently 101 | * with (during and on a separate thread from) sgen init. Callers are 102 | * responsible for enforcing this. 103 | */ 104 | MONO_API void mono_gc_register_bridge_callbacks (MonoGCBridgeCallbacks *callbacks); 105 | 106 | MONO_API void mono_gc_wait_for_bridge_processing (void); 107 | 108 | MONO_END_DECLS 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/threads.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Threading API 4 | * 5 | * Author: 6 | * Dick Porter (dick@ximian.com) 7 | * Patrik Torstensson (patrik.torstensson@labs2.com) 8 | * 9 | * (C) 2001 Ximian, Inc 10 | */ 11 | 12 | #ifndef _MONO_METADATA_THREADS_H_ 13 | #define _MONO_METADATA_THREADS_H_ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | MONO_BEGIN_DECLS 20 | 21 | /* This callback should return TRUE if the runtime must wait for the thread, FALSE otherwise */ 22 | typedef mono_bool (*MonoThreadManageCallback) (MonoThread* thread); 23 | 24 | extern MONO_API void mono_thread_init (MonoThreadStartCB start_cb, 25 | MonoThreadAttachCB attach_cb); 26 | extern MONO_API void mono_thread_cleanup (void); 27 | extern MONO_API void mono_thread_manage(void); 28 | 29 | extern MONO_API MonoThread *mono_thread_current (void); 30 | 31 | extern MONO_API void mono_thread_set_main (MonoThread *thread); 32 | extern MONO_API MonoThread *mono_thread_get_main (void); 33 | 34 | extern MONO_RT_EXTERNAL_ONLY MONO_API void mono_thread_stop (MonoThread *thread); 35 | 36 | extern MONO_API void mono_thread_new_init (intptr_t tid, void* stack_start, 37 | void* func); 38 | 39 | extern MONO_RT_EXTERNAL_ONLY MONO_API void 40 | mono_thread_create (MonoDomain *domain, void* func, void* arg); 41 | 42 | extern MONO_API MonoThread *mono_thread_attach (MonoDomain *domain); 43 | extern MONO_API void mono_thread_detach (MonoThread *thread); 44 | extern MONO_API void mono_thread_exit (void); 45 | 46 | extern MONO_API char *mono_thread_get_name_utf8 (MonoThread *thread); 47 | extern MONO_API int32_t mono_thread_get_managed_id (MonoThread *thread); 48 | 49 | MONO_API void mono_thread_set_manage_callback (MonoThread *thread, MonoThreadManageCallback func); 50 | 51 | extern MONO_API void mono_threads_set_default_stacksize (uint32_t stacksize); 52 | extern MONO_API uint32_t mono_threads_get_default_stacksize (void); 53 | 54 | MONO_API void mono_threads_request_thread_dump (void); 55 | 56 | MONO_API mono_bool mono_thread_is_foreign (MonoThread *thread); 57 | 58 | extern MONO_API mono_bool mono_thread_detach_if_exiting (void); 59 | 60 | MONO_END_DECLS 61 | 62 | #endif /* _MONO_METADATA_THREADS_H_ */ 63 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/tokentype.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef _MONO_METADATA_TOKENTYPE_H_ 6 | #define _MONO_METADATA_TOKENTYPE_H_ 7 | 8 | /* 9 | * These tokens match the table ID except for the last 10 | * three (string, name and base type which are special) 11 | */ 12 | 13 | typedef enum { 14 | MONO_TOKEN_MODULE = 0x00000000, 15 | MONO_TOKEN_TYPE_REF = 0x01000000, 16 | MONO_TOKEN_TYPE_DEF = 0x02000000, 17 | MONO_TOKEN_FIELD_DEF = 0x04000000, 18 | MONO_TOKEN_METHOD_DEF = 0x06000000, 19 | MONO_TOKEN_PARAM_DEF = 0x08000000, 20 | MONO_TOKEN_INTERFACE_IMPL = 0x09000000, 21 | MONO_TOKEN_MEMBER_REF = 0x0a000000, 22 | MONO_TOKEN_CUSTOM_ATTRIBUTE = 0x0c000000, 23 | MONO_TOKEN_PERMISSION = 0x0e000000, 24 | MONO_TOKEN_SIGNATURE = 0x11000000, 25 | MONO_TOKEN_EVENT = 0x14000000, 26 | MONO_TOKEN_PROPERTY = 0x17000000, 27 | MONO_TOKEN_MODULE_REF = 0x1a000000, 28 | MONO_TOKEN_TYPE_SPEC = 0x1b000000, 29 | MONO_TOKEN_ASSEMBLY = 0x20000000, 30 | MONO_TOKEN_ASSEMBLY_REF = 0x23000000, 31 | MONO_TOKEN_FILE = 0x26000000, 32 | MONO_TOKEN_EXPORTED_TYPE = 0x27000000, 33 | MONO_TOKEN_MANIFEST_RESOURCE = 0x28000000, 34 | MONO_TOKEN_GENERIC_PARAM = 0x2a000000, 35 | MONO_TOKEN_METHOD_SPEC = 0x2b000000, 36 | 37 | /* 38 | * These do not match metadata tables directly 39 | */ 40 | MONO_TOKEN_STRING = 0x70000000, 41 | MONO_TOKEN_NAME = 0x71000000, 42 | MONO_TOKEN_BASE_TYPE = 0x72000000 43 | } MonoTokenType; 44 | 45 | #endif /* _MONO_METADATA_TOKENTYPE_H_ */ 46 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/metadata/verify.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_METADATA_VERIFY_H__ 6 | #define __MONO_METADATA_VERIFY_H__ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include /* GSList dep */ 13 | 14 | MONO_BEGIN_DECLS 15 | 16 | typedef enum { 17 | MONO_VERIFY_OK, 18 | MONO_VERIFY_ERROR, 19 | MONO_VERIFY_WARNING, 20 | MONO_VERIFY_CLS = 4, 21 | MONO_VERIFY_ALL = 7, 22 | 23 | /* Status signaling code that is not verifiable.*/ 24 | MONO_VERIFY_NOT_VERIFIABLE = 8, 25 | 26 | /*OR it with other flags*/ 27 | 28 | /* Abort the verification if the code is not verifiable. 29 | * The standard behavior is to abort if the code is not valid. 30 | * */ 31 | MONO_VERIFY_FAIL_FAST = 16, 32 | 33 | 34 | /* Perform less verification of the code. This flag should be used 35 | * if one wants the verifier to be more compatible to the MS runtime. 36 | * Mind that this is not to be more compatible with MS peverify, but 37 | * with the runtime itself, that has a less strict verifier. 38 | */ 39 | MONO_VERIFY_NON_STRICT = 32, 40 | 41 | /*Skip all visibility related checks*/ 42 | MONO_VERIFY_SKIP_VISIBILITY = 64, 43 | 44 | /*Skip all visibility related checks*/ 45 | MONO_VERIFY_REPORT_ALL_ERRORS = 128 46 | 47 | } MonoVerifyStatus; 48 | 49 | typedef struct { 50 | char *message; 51 | MonoVerifyStatus status; 52 | } MonoVerifyInfo; 53 | 54 | typedef struct { 55 | MonoVerifyInfo info; 56 | MonoExceptionType exception_type : 8; /*should be one of MONO_EXCEPTION_* */ 57 | } MonoVerifyInfoExtended; 58 | 59 | 60 | MONO_API GSList* mono_method_verify (MonoMethod *method, int level); 61 | MONO_API void mono_free_verify_list (GSList *list); 62 | MONO_API char* mono_verify_corlib (void); 63 | 64 | MONO_END_DECLS 65 | 66 | #endif /* __MONO_METADATA_VERIFY_H__ */ 67 | 68 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/utils/mono-counters.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_COUNTERS_H__ 6 | #define __MONO_COUNTERS_H__ 7 | 8 | #include 9 | #include 10 | 11 | enum { 12 | /* Counter type, bits 0-7. */ 13 | MONO_COUNTER_INT, /* 32 bit int */ 14 | MONO_COUNTER_UINT, /* 32 bit uint */ 15 | MONO_COUNTER_WORD, /* pointer-sized int */ 16 | MONO_COUNTER_LONG, /* 64 bit int */ 17 | MONO_COUNTER_ULONG, /* 64 bit uint */ 18 | MONO_COUNTER_DOUBLE, 19 | MONO_COUNTER_STRING, /* char* */ 20 | MONO_COUNTER_TIME_INTERVAL, /* 64 bits signed int holding usecs. */ 21 | MONO_COUNTER_TYPE_MASK = 0xf, 22 | MONO_COUNTER_CALLBACK = 128, /* ORed with the other values */ 23 | MONO_COUNTER_SECTION_MASK = 0x00ffff00, 24 | /* Sections, bits 8-23 (16 bits) */ 25 | MONO_COUNTER_JIT = 1 << 8, 26 | MONO_COUNTER_GC = 1 << 9, 27 | MONO_COUNTER_METADATA = 1 << 10, 28 | MONO_COUNTER_GENERICS = 1 << 11, 29 | MONO_COUNTER_SECURITY = 1 << 12, 30 | MONO_COUNTER_RUNTIME = 1 << 13, 31 | MONO_COUNTER_SYSTEM = 1 << 14, 32 | MONO_COUNTER_PERFCOUNTERS = 1 << 15, 33 | MONO_COUNTER_PROFILER = 1 << 16, 34 | MONO_COUNTER_LAST_SECTION, 35 | 36 | /* Unit, bits 24-27 (4 bits) */ 37 | MONO_COUNTER_UNIT_SHIFT = 24, 38 | MONO_COUNTER_UNIT_MASK = 0xFu << MONO_COUNTER_UNIT_SHIFT, 39 | MONO_COUNTER_RAW = 0 << 24, /* Raw value */ 40 | MONO_COUNTER_BYTES = 1 << 24, /* Quantity of bytes. RSS, active heap, etc */ 41 | MONO_COUNTER_TIME = 2 << 24, /* Time interval in 100ns units. Minor pause, JIT compilation*/ 42 | MONO_COUNTER_COUNT = 3 << 24, /* Number of things (threads, queued jobs) or Number of events triggered (Major collections, Compiled methods).*/ 43 | MONO_COUNTER_PERCENTAGE = 4 << 24, /* [0-1] Fraction Percentage of something. Load average. */ 44 | 45 | /* Monotonicity, bits 28-31 (4 bits) */ 46 | MONO_COUNTER_VARIANCE_SHIFT = 28, 47 | MONO_COUNTER_VARIANCE_MASK = 0xFu << MONO_COUNTER_VARIANCE_SHIFT, 48 | MONO_COUNTER_MONOTONIC = 1 << 28, /* This counter value always increase/decreases over time. Reported by --stat. */ 49 | MONO_COUNTER_CONSTANT = 1 << 29, /* Fixed value. Used by configuration data. */ 50 | MONO_COUNTER_VARIABLE = 1 << 30, /* This counter value can be anything on each sampling. Only interesting when sampling. */ 51 | }; 52 | 53 | typedef struct _MonoCounter MonoCounter; 54 | 55 | MONO_API void mono_counters_enable (int section_mask); 56 | MONO_API void mono_counters_init (void); 57 | 58 | /* 59 | * register addr as the address of a counter of type type. 60 | * It may be a function pointer if MONO_COUNTER_CALLBACK is specified: 61 | * the function should return the value and take no arguments. 62 | */ 63 | MONO_API void mono_counters_register (const char* descr, int type, void *addr); 64 | MONO_API void mono_counters_register_with_size (const char *name, int type, void *addr, int size); 65 | 66 | typedef void (*MonoCounterRegisterCallback) (MonoCounter*); 67 | MONO_API void mono_counters_on_register (MonoCounterRegisterCallback callback); 68 | 69 | /* 70 | * Create a readable dump of the counters for section_mask sections (ORed section values) 71 | */ 72 | MONO_API void mono_counters_dump (int section_mask, FILE *outfile); 73 | 74 | MONO_API void mono_counters_cleanup (void); 75 | 76 | typedef mono_bool (*CountersEnumCallback) (MonoCounter *counter, void *user_data); 77 | 78 | MONO_API void mono_counters_foreach (CountersEnumCallback cb, void *user_data); 79 | 80 | MONO_API int mono_counters_sample (MonoCounter *counter, void *buffer, int buffer_size); 81 | 82 | MONO_API const char* mono_counter_get_name (MonoCounter *name); 83 | MONO_API int mono_counter_get_type (MonoCounter *counter); 84 | MONO_API int mono_counter_get_section (MonoCounter *counter); 85 | MONO_API int mono_counter_get_unit (MonoCounter *counter); 86 | MONO_API int mono_counter_get_variance (MonoCounter *counter); 87 | MONO_API size_t mono_counter_get_size (MonoCounter *counter); 88 | 89 | typedef enum { 90 | MONO_RESOURCE_JIT_CODE, /* bytes */ 91 | MONO_RESOURCE_METADATA, /* bytes */ 92 | MONO_RESOURCE_GC_HEAP, /* bytes */ 93 | MONO_RESOURCE_COUNT /* non-ABI value */ 94 | } MonoResourceType; 95 | 96 | typedef void (*MonoResourceCallback) (int resource_type, uintptr_t value, int is_soft); 97 | 98 | MONO_API int mono_runtime_resource_limit (int resource_type, uintptr_t soft_limit, uintptr_t hard_limit); 99 | MONO_API void mono_runtime_resource_set_callback (MonoResourceCallback callback); 100 | MONO_API void mono_runtime_resource_check_limit (int resource_type, uintptr_t value); 101 | 102 | #endif /* __MONO_COUNTERS_H__ */ 103 | 104 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/utils/mono-dl-fallback.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_UTILS_DL_FALLBACK_H__ 6 | #define __MONO_UTILS_DL_FALLBACK_H__ 7 | 8 | #include 9 | 10 | MONO_BEGIN_DECLS 11 | 12 | enum { 13 | MONO_DL_EAGER = 0, 14 | MONO_DL_LAZY = 1, 15 | MONO_DL_LOCAL = 2, 16 | MONO_DL_MASK = 3 17 | }; 18 | 19 | /* 20 | * This is the dynamic loader fallback API 21 | */ 22 | typedef struct MonoDlFallbackHandler MonoDlFallbackHandler; 23 | 24 | /* 25 | * The "err" variable contents must be allocated using g_malloc or g_strdup 26 | */ 27 | typedef void* (*MonoDlFallbackLoad) (const char *name, int flags, char **err, void *user_data); 28 | typedef void* (*MonoDlFallbackSymbol) (void *handle, const char *name, char **err, void *user_data); 29 | typedef void* (*MonoDlFallbackClose) (void *handle, void *user_data); 30 | 31 | MONO_API MonoDlFallbackHandler *mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func, 32 | MonoDlFallbackClose close_func, void *user_data); 33 | 34 | MONO_API void mono_dl_fallback_unregister (MonoDlFallbackHandler *handler); 35 | 36 | MONO_END_DECLS 37 | 38 | #endif /* __MONO_UTILS_DL_FALLBACK_H__ */ 39 | 40 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/utils/mono-error.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_ERROR_H__ 6 | #define __MONO_ERROR_H__ 7 | 8 | #include 9 | 10 | enum { 11 | /* 12 | The supplied strings were dup'd by means of calling mono_error_dup_strings. 13 | */ 14 | MONO_ERROR_FREE_STRINGS = 0x0001, 15 | 16 | /* 17 | Something happened while processing the error and the resulting message is incomplete. 18 | */ 19 | MONO_ERROR_INCOMPLETE = 0x0002, 20 | /* 21 | This MonoError is heap allocated in a mempool 22 | */ 23 | MONO_ERROR_MEMPOOL_BOXED = 0x0004 24 | }; 25 | 26 | enum { 27 | MONO_ERROR_NONE = 0, 28 | MONO_ERROR_MISSING_METHOD = 1, 29 | MONO_ERROR_MISSING_FIELD = 2, 30 | MONO_ERROR_TYPE_LOAD = 3, 31 | MONO_ERROR_FILE_NOT_FOUND = 4, 32 | MONO_ERROR_BAD_IMAGE = 5, 33 | MONO_ERROR_OUT_OF_MEMORY = 6, 34 | MONO_ERROR_ARGUMENT = 7, 35 | MONO_ERROR_ARGUMENT_NULL = 11, 36 | MONO_ERROR_NOT_VERIFIABLE = 8, 37 | MONO_ERROR_INVALID_PROGRAM = 12, 38 | 39 | /* 40 | * This is a generic error mechanism is you need to raise an arbitrary corlib exception. 41 | * You must pass the exception name otherwise prepare_exception will fail with internal execution. 42 | */ 43 | MONO_ERROR_GENERIC = 9, 44 | /* This one encapsulates a managed exception instance */ 45 | MONO_ERROR_EXCEPTION_INSTANCE = 10, 46 | 47 | /* Not a valid error code - indicates that the error was cleaned up and reused */ 48 | MONO_ERROR_CLEANUP_CALLED_SENTINEL = 0xffff 49 | }; 50 | 51 | /*Keep in sync with MonoErrorInternal*/ 52 | typedef struct _MonoError { 53 | unsigned short error_code; 54 | unsigned short hidden_0; /*DON'T TOUCH */ 55 | 56 | void *hidden_1 [12]; /*DON'T TOUCH */ 57 | } MonoError; 58 | 59 | /* Mempool-allocated MonoError.*/ 60 | typedef struct _MonoErrorBoxed MonoErrorBoxed; 61 | 62 | MONO_BEGIN_DECLS 63 | 64 | MONO_RT_EXTERNAL_ONLY 65 | MONO_API void 66 | mono_error_init (MonoError *error); 67 | 68 | MONO_API void 69 | mono_error_init_flags (MonoError *error, unsigned short flags); 70 | 71 | MONO_API void 72 | mono_error_cleanup (MonoError *error); 73 | 74 | MONO_API mono_bool 75 | mono_error_ok (MonoError *error); 76 | 77 | MONO_API unsigned short 78 | mono_error_get_error_code (MonoError *error); 79 | 80 | MONO_API const char* 81 | mono_error_get_message (MonoError *error); 82 | 83 | MONO_END_DECLS 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/utils/mono-logger.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_LOGGER_H__ 6 | #define __MONO_LOGGER_H__ 7 | 8 | #include 9 | MONO_BEGIN_DECLS 10 | 11 | MONO_API void 12 | mono_trace_set_level_string (const char *value); 13 | 14 | MONO_API void 15 | mono_trace_set_mask_string (const char *value); 16 | 17 | typedef void (*MonoPrintCallback) (const char *string, mono_bool is_stdout); 18 | typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data); 19 | 20 | MONO_API void 21 | mono_trace_set_log_handler (MonoLogCallback callback, void *user_data); 22 | 23 | MONO_API void 24 | mono_trace_set_print_handler (MonoPrintCallback callback); 25 | 26 | MONO_API void 27 | mono_trace_set_printerr_handler (MonoPrintCallback callback); 28 | 29 | MONO_END_DECLS 30 | 31 | #endif /* __MONO_LOGGER_H__ */ 32 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/include/mono/utils/mono-publib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | */ 4 | 5 | #ifndef __MONO_PUBLIB_H__ 6 | #define __MONO_PUBLIB_H__ 7 | 8 | /* 9 | * Minimal general purpose header for use in public mono header files. 10 | * We can't include config.h, so we use compiler-specific preprocessor 11 | * directives where needed. 12 | */ 13 | 14 | #ifdef __cplusplus 15 | #define MONO_BEGIN_DECLS extern "C" { 16 | #define MONO_END_DECLS } 17 | #else 18 | #define MONO_BEGIN_DECLS 19 | #define MONO_END_DECLS 20 | #endif 21 | 22 | MONO_BEGIN_DECLS 23 | 24 | /* VS 2010 and later have stdint.h */ 25 | #if defined(_MSC_VER) 26 | 27 | #if _MSC_VER < 1600 28 | 29 | typedef __int8 int8_t; 30 | typedef unsigned __int8 uint8_t; 31 | typedef __int16 int16_t; 32 | typedef unsigned __int16 uint16_t; 33 | typedef __int32 int32_t; 34 | typedef unsigned __int32 uint32_t; 35 | typedef __int64 int64_t; 36 | typedef unsigned __int64 uint64_t; 37 | 38 | #else 39 | 40 | #include 41 | 42 | #endif 43 | 44 | #define MONO_API_EXPORT __declspec(dllexport) 45 | #define MONO_API_IMPORT __declspec(dllimport) 46 | 47 | #else 48 | 49 | #include 50 | 51 | #ifdef __GNUC__ 52 | #define MONO_API_EXPORT __attribute__ ((__visibility__ ("default"))) 53 | #else 54 | #define MONO_API_EXPORT 55 | #endif 56 | #define MONO_API_IMPORT 57 | 58 | #endif /* end of compiler-specific stuff */ 59 | 60 | #include 61 | 62 | #if defined(MONO_DLL_EXPORT) 63 | #define MONO_API MONO_API_EXPORT 64 | #elif defined(MONO_DLL_IMPORT) 65 | #define MONO_API MONO_API_IMPORT 66 | #else 67 | #define MONO_API 68 | #endif 69 | 70 | typedef int32_t mono_bool; 71 | typedef uint8_t mono_byte; 72 | typedef uint16_t mono_unichar2; 73 | typedef uint32_t mono_unichar4; 74 | 75 | typedef void (*MonoFunc) (void* data, void* user_data); 76 | typedef void (*MonoHFunc) (void* key, void* value, void* user_data); 77 | 78 | MONO_API void mono_free (void *); 79 | 80 | #define MONO_ALLOCATOR_VTABLE_VERSION 1 81 | 82 | typedef struct { 83 | int version; 84 | void *(*malloc) (size_t size); 85 | void *(*realloc) (void *mem, size_t count); 86 | void (*free) (void *mem); 87 | void *(*calloc) (size_t count, size_t size); 88 | } MonoAllocatorVTable; 89 | 90 | MONO_API mono_bool 91 | mono_set_allocator_vtable (MonoAllocatorVTable* vtable); 92 | 93 | 94 | #define MONO_CONST_RETURN const 95 | 96 | /* 97 | * When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any 98 | * other Mono header file if you use a different compiler from the one used to 99 | * build Mono. 100 | */ 101 | #ifndef MONO_ZERO_LEN_ARRAY 102 | #ifdef __GNUC__ 103 | #define MONO_ZERO_LEN_ARRAY 0 104 | #else 105 | #define MONO_ZERO_LEN_ARRAY 1 106 | #endif 107 | #endif 108 | 109 | #if defined (MONO_INSIDE_RUNTIME) 110 | 111 | #if defined (__clang__) 112 | #define MONO_RT_EXTERNAL_ONLY __attribute__ ((__unavailable__ ("The mono runtime must not call this function"))) 113 | #elif defined (__GNUC__) 114 | #define MONO_RT_EXTERNAL_ONLY __attribute__ ((__error__ ("The mono runtime must not call this function"))) 115 | #else 116 | #define MONO_RT_EXTERNAL_ONLY 117 | #endif /* __clang__ */ 118 | 119 | #else 120 | #define MONO_RT_EXTERNAL_ONLY 121 | #endif /* MONO_INSIDE_RUNTIME */ 122 | 123 | #ifdef __GNUC__ 124 | #define _MONO_DEPRECATED __attribute__ ((__deprecated__)) 125 | #elif defined (_MSC_VER) 126 | #define _MONO_DEPRECATED __declspec (deprecated) 127 | #else 128 | #define _MONO_DEPRECATED 129 | #endif 130 | 131 | #define MONO_DEPRECATED MONO_API MONO_RT_EXTERNAL_ONLY _MONO_DEPRECATED 132 | 133 | MONO_END_DECLS 134 | 135 | #endif /* __MONO_PUBLIB_H__ */ 136 | 137 | -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/lib/Mac/libmonosgen-2.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/lib/Mac/libmonosgen-2.0.dylib -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/lib/Win32/mono-2.0-sgen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/lib/Win32/mono-2.0-sgen.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/lib/Win32/mono-2.0-sgen.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/lib/Win32/mono-2.0-sgen.lib -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/lib/Win64/mono-2.0-sgen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/lib/Win64/mono-2.0-sgen.dll -------------------------------------------------------------------------------- /Plugins/UnrealInk/ThirdParty/Mono/lib/Win64/mono-2.0-sgen.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidColson/UnrealInk/fa5da4e8d481cb554cfec2fc69de07f2c7bd2e08/Plugins/UnrealInk/ThirdParty/Mono/lib/Win64/mono-2.0-sgen.lib -------------------------------------------------------------------------------- /Plugins/UnrealInk/UnrealInk.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "0.1", 5 | "FriendlyName": "Unreal Ink", 6 | "Description": "", 7 | "Category": "Other", 8 | "CreatedBy": "", 9 | "CreatedByURL": "", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "EngineVersion": "4.26.0", 14 | "CanContainContent": true, 15 | "IsBetaVersion": true, 16 | "Installed": true, 17 | "Modules": [ 18 | { 19 | "Name": "Ink", 20 | "Type": "Runtime", 21 | "LoadingPhase": "Default", 22 | "WhitelistPlatforms": [ 23 | "Win64", 24 | "Win32" 25 | ] 26 | }, 27 | { 28 | "Name": "InkEditor", 29 | "Type": "Editor", 30 | "LoadingPhase": "Default", 31 | "WhitelistPlatforms": [ 32 | "Win64", 33 | "Win32" 34 | ] 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unreal Ink 2 | 3 | This is a plugin allowing you to use the excellent dynamic narrative scripting system, Ink, in Unreal Engine. [Visit the Ink repository for more information on it.](https://github.com/inkle/ink) The plugin still is ostensibly finished. All of the features of the C# API are available except for the profiler, which isn't hugely important. Also the ink runtime itself is up to date and fully featured. Please don't hesistate to contact me for any problems or help you need. I live at @dave_colson on twitter and you can email me at davidcncolson@gmail.com. 4 | 5 | As of current master branch, compatible with Ink 0.9.0. 6 | 7 | ![Example Project](Documentation/Example.png) 8 | 9 | # How to use 10 | 11 | I have provided packaged versions of the plugin, complete with the example project. I try keep it updated for the most recent versions of Unreal, if it's not updated poke me and I can do it for you. Simply drop the packaged plugin into the plugins folder of your engine or game. Once loaded it into your project, you can use the plugin either through C++ or more easily through blueprints. First though we need to go over importing Ink assets. 12 | 13 | ## Importing Ink Assets 14 | 15 | The plugin provides a new asset that represents ink stories (`UStoryAsset`). You can import plain .ink files and the plugin will automatically compile them for you. This way you can set up auto-reimporting of the ink files which will be recompiled on import. Simply import the .ink file as you would any other file. 16 | 17 | ## Use through blueprints 18 | 19 | After importing your .ink file, you can create a new story node and select your story asset in the dropdown. 20 | 21 | ![New Story](Documentation/NewStoryNode.png) 22 | 23 | This will return a story instance, which can then be used just like as is shown in the [inkle documentation](https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md) files. The idea is that there's a node for every function available in the Ink API, though a few are missing. 24 | 25 | I have provided an example project demonstrating a basic usage of the system, which only uses blueprints, so go check that out. 26 | 27 | ## Use through C++ 28 | 29 | It's very similar to the blueprints here as well. Load a story asset file, call `UStory::NewStory();` and then all existing function calls are basically the same as in the Inkle library, with a couple of exceptions (variadic functions). I will provide an example of this soon. For now take a look at the `Story.h` file for a list of possible function calls. 30 | 31 | # How does it work? 32 | 33 | It works by embedding the Mono runtime directly into the plugin in Unreal, and then has a special C# assembly called InkGlue, which marshalls data and function calls between C# and C++ to lessen the amount of complicated binding code present in C++. It requires linking with mono, and since I've only got a windows PC currently I've provided the windows mono library. Theoretically it'll work fine on Mac, you just need to link the mono-sgen dynlib. 34 | 35 | ## Platform support 36 | 37 | - Windows - First class support 38 | - Mac - I have setup the build scripts to support Mac, and I've provided the third party dlls so that it'll work, but I don't have a Mac so this is untested. **Seeking people with a Mac to help me test this** 39 | - Consoles - Mono is stated to work on PS4 and Xbox One/Series X but I have no access to dev kits so I cannot test this. Theoretically it would just involve linking the appropriate mono library, and including matching core assemblies that you've compiled with mono. 40 | -------------------------------------------------------------------------------- /Source/UnrealInkExample.Target.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class UnrealInkExampleTarget : TargetRules 7 | { 8 | public UnrealInkExampleTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Game; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | 13 | ExtraModuleNames.AddRange( new string[] { "UnrealInkExample" } ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/UnrealInkExample/DummyClass.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "DummyClass.h" 5 | 6 | DummyClass::DummyClass() 7 | { 8 | } 9 | 10 | DummyClass::~DummyClass() 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /Source/UnrealInkExample/DummyClass.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | /** 8 | * 9 | */ 10 | class UNREALINKEXAMPLE_API DummyClass 11 | { 12 | public: 13 | DummyClass(); 14 | ~DummyClass(); 15 | }; 16 | -------------------------------------------------------------------------------- /Source/UnrealInkExample/UnrealInkExample.Build.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UnrealInkExample : ModuleRules 6 | { 7 | public UnrealInkExample(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); 12 | 13 | PrivateDependencyModuleNames.AddRange(new string[] { }); 14 | 15 | // Uncomment if you are using Slate UI 16 | // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); 17 | 18 | // Uncomment if you are using online features 19 | // PrivateDependencyModuleNames.Add("OnlineSubsystem"); 20 | 21 | // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Source/UnrealInkExample/UnrealInkExample.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #include "UnrealInkExample.h" 4 | #include "Modules/ModuleManager.h" 5 | 6 | IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, UnrealInkExample, "UnrealInkExample" ); 7 | -------------------------------------------------------------------------------- /Source/UnrealInkExample/UnrealInkExample.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | -------------------------------------------------------------------------------- /Source/UnrealInkExampleEditor.Target.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class UnrealInkExampleEditorTarget : TargetRules 7 | { 8 | public UnrealInkExampleEditorTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Editor; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | 13 | ExtraModuleNames.AddRange( new string[] { "UnrealInkExample" } ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UnrealInkExample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28315.86 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{94A6C6F3-99B3-346E-9557-ABF9D4064DBD}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{8E2F6A87-1826-34F4-940C-CC23A48F9FE4}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnrealInkExample", "Intermediate\ProjectFiles\UnrealInkExample.vcxproj", "{22DC307A-52C3-4896-8B66-2F1060236D37}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{38C2BE48-3E97-4FCF-AC51-492AB4CFF160}" 13 | EndProject 14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}" 15 | ProjectSection(SolutionItems) = preProject 16 | E:\Epic Games\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis = E:\Epic Games\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis 17 | EndProjectSection 18 | EndProject 19 | Global 20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 21 | DebugGame Editor|IOS = DebugGame Editor|IOS 22 | DebugGame Editor|Win32 = DebugGame Editor|Win32 23 | DebugGame Editor|Win64 = DebugGame Editor|Win64 24 | DebugGame|IOS = DebugGame|IOS 25 | DebugGame|Win32 = DebugGame|Win32 26 | DebugGame|Win64 = DebugGame|Win64 27 | Development Editor|IOS = Development Editor|IOS 28 | Development Editor|Win32 = Development Editor|Win32 29 | Development Editor|Win64 = Development Editor|Win64 30 | Development|IOS = Development|IOS 31 | Development|Win32 = Development|Win32 32 | Development|Win64 = Development|Win64 33 | Shipping|IOS = Shipping|IOS 34 | Shipping|Win32 = Shipping|Win32 35 | Shipping|Win64 = Shipping|Win64 36 | EndGlobalSection 37 | # Visual Assist Section 38 | GlobalSection(44630d46-96b5-488c-8df926e21db8c1a3) = preSolution 39 | ueSolution=true 40 | EndGlobalSection 41 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 42 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame Editor|IOS.ActiveCfg = Invalid|Win32 43 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame Editor|Win32.ActiveCfg = Invalid|Win32 44 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64 45 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64 46 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|IOS.ActiveCfg = IOS_DebugGame|Win32 47 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|IOS.Build.0 = IOS_DebugGame|Win32 48 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|Win32.ActiveCfg = DebugGame|Win32 49 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|Win32.Build.0 = DebugGame|Win32 50 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|Win64.ActiveCfg = DebugGame|x64 51 | {22DC307A-52C3-4896-8B66-2F1060236D37}.DebugGame|Win64.Build.0 = DebugGame|x64 52 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development Editor|IOS.ActiveCfg = Invalid|Win32 53 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development Editor|Win32.ActiveCfg = Invalid|Win32 54 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development Editor|Win64.ActiveCfg = Development_Editor|x64 55 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development Editor|Win64.Build.0 = Development_Editor|x64 56 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|IOS.ActiveCfg = IOS_Development|Win32 57 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|IOS.Build.0 = IOS_Development|Win32 58 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|Win32.ActiveCfg = Development|Win32 59 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|Win32.Build.0 = Development|Win32 60 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|Win64.ActiveCfg = Development|x64 61 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Development|Win64.Build.0 = Development|x64 62 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|IOS.ActiveCfg = IOS_Shipping|Win32 63 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|IOS.Build.0 = IOS_Shipping|Win32 64 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|Win32.ActiveCfg = Shipping|Win32 65 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|Win32.Build.0 = Shipping|Win32 66 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|Win64.ActiveCfg = Shipping|x64 67 | {22DC307A-52C3-4896-8B66-2F1060236D37}.Shipping|Win64.Build.0 = Shipping|x64 68 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame Editor|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 69 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 70 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 71 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 72 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 73 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 74 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development Editor|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 75 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 76 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 77 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 78 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 79 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 80 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Shipping|IOS.ActiveCfg = BuiltWithUnrealBuildTool|Win32 81 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Shipping|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32 82 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32 83 | EndGlobalSection 84 | GlobalSection(SolutionProperties) = preSolution 85 | HideSolutionNode = FALSE 86 | EndGlobalSection 87 | GlobalSection(NestedProjects) = preSolution 88 | {38C2BE48-3E97-4FCF-AC51-492AB4CFF160} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD} 89 | {22DC307A-52C3-4896-8B66-2F1060236D37} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4} 90 | EndGlobalSection 91 | EndGlobal 92 | -------------------------------------------------------------------------------- /UnrealInkExample.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "EngineAssociation": "4.27", 4 | "Category": "", 5 | "Description": "", 6 | "Modules": [ 7 | { 8 | "Name": "UnrealInkExample", 9 | "Type": "Runtime", 10 | "LoadingPhase": "Default" 11 | } 12 | ], 13 | "Plugins": [ 14 | { 15 | "Name": "SteamVR", 16 | "Enabled": false, 17 | "SupportedTargetPlatforms": [ 18 | "Win32", 19 | "Win64", 20 | "Linux", 21 | "Mac" 22 | ] 23 | }, 24 | { 25 | "Name": "UnrealInk", 26 | "Enabled": true 27 | } 28 | ] 29 | } --------------------------------------------------------------------------------