All Projects → sailro → UnityExternal

sailro / UnityExternal

Licence: MIT license
Unity project demonstrating the use of an external C# project with Visual Studio Tools for Unity (VSTU).

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to UnityExternal

use-async-memo
React hook for generating async memoized data.
Stars: ✭ 130 (+441.67%)
Mutual labels:  hook
PtraceInject
Android进程注入学习笔记
Stars: ✭ 70 (+191.67%)
Mutual labels:  hook
ilvr adm
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models (ICCV 2021 Oral)
Stars: ✭ 133 (+454.17%)
Mutual labels:  generation
letsencrypt-manual-hook
Allows you to use dehydrated (a Let's Encrypt/Acme Client) and DNS challenge response with a DNS provider that requires manual intervention
Stars: ✭ 61 (+154.17%)
Mutual labels:  hook
aspectgo
Aspect-Oriented Programming framework for Go
Stars: ✭ 62 (+158.33%)
Mutual labels:  hook
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (+0%)
Mutual labels:  hook
table-evaluator
Evaluate real and synthetic datasets with each other
Stars: ✭ 44 (+83.33%)
Mutual labels:  generation
Speech driven gesture generation with autoencoder
This is the official implementation for IVA '19 paper "Analyzing Input and Output Representations for Speech-Driven Gesture Generation".
Stars: ✭ 76 (+216.67%)
Mutual labels:  generation
react-use-hoverintent
React hook for hoverIntent
Stars: ✭ 16 (-33.33%)
Mutual labels:  hook
WechatHttpApiWeb
Wechat Http Api Html
Stars: ✭ 36 (+50%)
Mutual labels:  hook
react-health-check
Lightweight React hook for checking health of API services.
Stars: ✭ 28 (+16.67%)
Mutual labels:  hook
use-prefers-color-scheme
🪝 React hook for subscribing to user's color scheme preference.
Stars: ✭ 28 (+16.67%)
Mutual labels:  hook
OSRSUpdater
A simple (and outdated) Old-School RuneScape decompiler/deobfuscator. Performs field and method analysis which uses ASM and bytecode patterns for identification. Identified fields could be used for creating bot clients or QoL clients. For educational use only.
Stars: ✭ 13 (-45.83%)
Mutual labels:  hook
hookey
Enables all the DLCs. Like Creamapi but just for linux and a subset of Paradox games.
Stars: ✭ 87 (+262.5%)
Mutual labels:  hook
use-react-router-breadcrumbs
tiny, flexible, hook for rendering route breadcrumbs with react-router v6
Stars: ✭ 170 (+608.33%)
Mutual labels:  hook
semantic-commit-hook
Git hook that enforces semantic commit messages.
Stars: ✭ 34 (+41.67%)
Mutual labels:  hook
libwifi
An 802.11 Frame Generation and Parsing Library in C
Stars: ✭ 27 (+12.5%)
Mutual labels:  generation
react-use-observer
Performant react hooks for WebApi Observers, useResizeObserver, useInteractionObserver, useMutationObserver
Stars: ✭ 19 (-20.83%)
Mutual labels:  hook
fine
🧹 Gracefully shutdown Node.js application: help you handle exit signals and cleanup
Stars: ✭ 20 (-16.67%)
Mutual labels:  hook
erdiagram
Entity-Relationship diagram code generator library
Stars: ✭ 28 (+16.67%)
Mutual labels:  generation

UnityExternal

Unity project demonstrating the -full- use of an external C# project with Visual Studio Tools for Unity (VSTU).

Using external projects with VSTU generated solutions is not yet fully supported. VSTU is able to see external projects in solutions, but VSTU generated projects will use an assembly reference (and not a project reference).

If you want to keep real project references (so being able to use refactoring or GotoDefinition), there is a possible workaround, using file generation hooks.

Here is a working prototype :

  • Using the Solution hook, we add the external project to the solution:
Project("{C# GUID}") = "ExternalLibrary", "{...}\ExternalLibrary.csproj", "{Project GUID}"
EndProject
  • Using the Project hook, we add the external project as a reference:
<ItemGroup>
  <ProjectReference Include="{...}\ExternalLibrary.csproj">
    <Project>{Project GUID}</Project>
    <Name>ExternalLibrary</Name>
  </ProjectReference>
</ItemGroup>
  • Then we add a postbuild event to copy the compiled assembly DLL to the Unity asset folder (because we have to compile both in VS and Unity):
<PropertyGroup>
  <RunPostBuildEvent>Always</RunPostBuildEvent>
  <PostBuildEvent>copy /Y $(TargetDir)ExternalLibrary.dll {...}\Assets</PostBuildEvent>
</PropertyGroup>
  • Finally we remove the reference to the assembly dll to avoid collisions with the project reference. (as we deploy a DLL in the asset folder, VSTU will try to add a reference to the DLL):
``` Assets\ExternalLibrary.dll ``` The [interesting part is here](/UnityProject/Assets/Editor), using two Editor scripts.

Now you can easily update your external projects files:

  • VS solution and projects will correctly reference your external project.
  • Unity will use the newly compiled version after a VS build (thanks to the post build event).
  • You can refactor what you want as for any other project.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].