unity-technologies / desktopsamples Goto Github PK
View Code? Open in Web Editor NEWThis repository contains Unity samples for desktop platforms
License: MIT License
This repository contains Unity samples for desktop platforms
License: MIT License
I had a unity project that required to be embedded in a UWP C# project with implemented functions for the connection between them
So I went through the example in the CSharpProjectExample DesktopSamples/UniversalWindowsPlatformSamples/CSharpProjectExample
and tried to do the same but I always end but with a c++ build only. kindly advise
The Unity version is 2021.3.19f1
The Xcode project ASimplePlugin.xcodeproj only has a dylib target, not a Bundle. Additionally, the build settings have "Build Active Architecture Only" set for Debug builds, which causes a DllNotFound exception when trying to use the plugin in Unity.
I don't see m_MoveWindowInProgress being used. Is that a bug?
when play .It show me the error below:
DllNotFoundException: ASimplePlugin
PluginImport.Start () (at Assets/PluginImport.cs:22)
I Build this whole project as Android build. But when I tried to run it, I am getting DLLNotFoundException in Android.
02-21 12:08:18.097 11728 11728 I Finsky : [1] zzh.gS(6): Verification complete: id=23, package_name=com.DefaultCompany.UnityProject
02-21 12:08:20.093 11767 11791 E Unity : DllNotFoundException: ASimplePlugin
02-21 12:08:20.093 11767 11791 E Unity : at (wrapper managed-to-native) PluginImport.PrintANumber()
02-21 12:08:20.093 11767 11791 E Unity : at PluginImport.Start () [0x00000] in <31abdb6ab2ee4a3eb3f810a4341bf159>:0
02-21 12:08:20.093 11767 11791 E Unity :
02-21 12:08:20.093 11767 11791 E Unity : (Filename: <31abdb6ab2ee4a3eb3f810a4341bf159> Line: 0)
02-21 12:08:20.093 11767 11791 E Unity :
in which project unity used as a library for window
and the data bi-directional communication between unity and window cpp code
private void RefreshResolutions()
{
var resolutions = Screen.resolutions;
// Filter out non-unique resolutions
Array.Sort(resolutions, s_ResolutionComparer);
int uniqueResolutionCount = 0;
for (int i = 1; i < resolutions.Length; i++)
{
if (s_ResolutionComparer.Compare(resolutions[i], resolutions[uniqueResolutionCount]) != 0)
{
uniqueResolutionCount++;
if (uniqueResolutionCount != i)
resolutions[uniqueResolutionCount] = resolutions[i];
}
}
// --------- HERE!!!!!!
if (uniqueResolutionCount == 0)
{
uniqueResolutionCount = 1;
m_EmptyResolution[0] = Screen.currentResolution;
resolutions = m_EmptyResolution;
}
var currentWidth = Screen.width;
var currentHeight = Screen.height;
int currentResolutionIndex = uniqueResolutionCount - 1;
var resolutionDropdownOptions = m_ResolutionDropdown.options;
MoveOptionsToCache(resolutionDropdownOptions);
for (int i = 0; i < uniqueResolutionCount; i++)
{
var option = GetNewOption();
var resolution = resolutions[i];
option.text = GetCachedResolutionText(resolution.width, resolution.height);
resolutionDropdownOptions.Add(option);
if (resolution.width == currentWidth && resolution.height == currentHeight)
currentResolutionIndex = i;
}
m_Resolutions = resolutions;
m_ResolutionDropdown.SetValueWithoutNotify(currentResolutionIndex);
}
I believe uniqueResolutionCount will always be 1 less than it should be because "i" starts a 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.