Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.73 KB

File metadata and controls

53 lines (36 loc) · 1.73 KB

Mirage Standalone

Mirage Standalone package is a .NET Core version of Mirage. Mirage Standalone allows the core parts of Mirage to be used outside of unity.

Mirage is a rolling-release high-level API for the Unity Game Engine that provides a powerful, yet easy to use networking API. It is designed to work with Unity 3D and is available on GitHub.

Install

Requires installation of .NET 8: https://dotnet.microsoft.com/en-us/download/dotnet/8.0

Either add source code to your project, or add the nuget package

Adding Weaver to project

Add this to the .csproj for a project. when working within this project

  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="$(SolutionDir)\\Mirage.CodeGen\bin\$(ConfigurationName)\net5.0\Mirage.CodeGen.exe $(TargetPath)" />
    <Error Condition="$(ExitCode) == 1" />
  </Target>

or add this when working with the nuget package

  <ItemGroup>
    <PackageReference Include="MirageNet.Mirage" Version="130.3.5" GeneratePathProperty="true" />
  </ItemGroup>

  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="&quot;$(PkgMirageNet_Mirage)/CodeGen/Mirage.CodeGen.exe&quot; &quot;$(TargetPath)&quot;" />
    <Error Condition="$(ExitCode) == 1" />
  </Target>

It will cause weaver to run when that project is compiled and stop if weaver has any errors

Create package

sh Pack.sh

How to update this repo

Run copy script

CopyFromMirage.sh "<path to mirage repo>"

This script will delete all old scripts and copy new scripts into the correct folders in this repo. The files should then be double checked before committing and pushing.