Comments (13)
Thats a bit odd. I can't seem to repro this. Moreover I would expect the issue to happen in the TouchInput class.. If you stick a breakpoint in there is that method returning?
from nez.
Okay so it tries to run:
_isConnected = TouchPanel.GetCapabilities().IsConnected;
and fails because user32.dll is not found :/
I've tried to search for a similar problem but seems no-one has had this happen?
from nez.
Okay this fixes it, seems DesktopGL doesn't like TouchPanel on OS X not sure about windows? Although you are using OS X are you not?
#if !___IOS___ || !___ANDROID___ || !FNA
_isConnected = false;
#else
_isConnected = TouchPanel.GetCapabilities().IsConnected;
#endif
from nez.
I am indeed on OS X and it seems to work for me. Very odd. I'll wrap it up in the next commit just to be safe. The only downside is that it will end up requiring separate DLLs if not building from source for iOS/Android vs desktop. I think MonoGame's next release will finally have runtime platform check so that would solve it more gracefully.
from nez.
Possibly something different in Xamarin 6.0 to 6.0.1? That's the only thing that is different between our setups that I can think of.
from nez.
I just pushed a commit that does things a bit differently and requires manually enabling touch support. See if it solves it for you.
from nez.
Yeah working fine with that commit! Will test a touch device shortly but only had issue's on my mac regarding this. Thanks.
from nez.
It seems to work on Mac, Windows and iOS for me so hopefully this does the trick.
from nez.
Hello,
This issue is plaguing me. I'm new to Monogame and C#, but not Visual Studio so I know somewhat of what i'm doing.
I cloned the samples, built Nez/Nez.sln, then when I open Nez.Samples and attempt to run it I get:
An unhandled exception of type 'System.TypeInitializationException' occurred in Nez.dll
Additional information: The type initializer for 'Nez.Input' threw an exception.
It points to Scene.cs:656 which is
Input._resolutionScale = new Vector2( scaleX, scaleY );
OS: Windows 10 x64
IDE: Visual Studio Community 2015
I see that you mentioned a fix above, I applied that to enableTouchSupport() and it still throws the error. I've even just set _isConnected = false so it wouldn't do anything with it and it still throws the exception mentioned from the original submitter.
from nez.
A TypeInitializationException will hide the underlying problem. Put a breakpoint in the Input initializer and see what the real exception is and where it is occurring.
from nez.
Hi,
I'm not sure how to read the output of that breakpoint. It seems to be pointing all over the place.
Is this an issue with something i've done, or the repo? I haven't done any modifications other than the previously mentioned fix, so this is an error straight out of the box.
MonoGame SDK 3.5.1
XNA Redist 4.0 Refresh
from nez.
There shouldn't be any need to change the base code at all. A fix was pushed in a recent commit that moves touch stuff into its own method until MonoGame gets a fix out.
It's impossible to say what is happening here without the actual Exception. Stick a breakpoint in the Input constructor and step through there. That will reveal the actual error that is occurring.
from nez.
Closing this one since it seems like it is all fixed up.
from nez.
Related Issues (20)
- Incompatibility for MonoGame and Nez HOT 1
- Tiled Renderer ignores tileset offset
- Crash when toggling imGui on Linux HOT 1
- Crash when adding FramesPerSecondCounter component in Initialize
- FramesPerSecondCounter draws in world space not in camera space
- How to setup with vscode? HOT 2
- FNA dynamic buffer warning: "Dynamic buffer using SetDataOptions.None, expect bad performance and broken output!"
- Nez.UI ProgressBar is a fixed length HOT 1
- Mathf.AngleBetweenVectors() does not compute the angle between vectors HOT 1
- RendererableComponentList uses unstable sorting algorithm HOT 1
- camera 3d view matrix does not include rotation HOT 1
- Sprite and SpriteAnimator not showing images HOT 1
- Batcher.PushSprite does not round Sprite destination HOT 1
- .Net 7 Support
- Physics.Overlap rect not right size.
- DisposableAsset property not public.
- Installation impossible in VS Code? HOT 1
- Outdated example in FAQs/Rendering.md
- Documentation mistake where CameraBounds is mentioned
- Nez.UI SetScrollBarPositions does opposite of parameter name.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nez.