dotnet tool
then it must've been removed from there somehow
mgcb-editor
work for you in a terminal?
which mgcb-editor
)
$HOME/.dotnet/tools
Hello friends. I've just git cloned source code from master branch but I can't to build solution for Linux OS because I get such error:
Error: NuGet packages need to be restored before building. NuGet MSBuild targets are missing and are needed for building. The NuGet MSBuild targets are generated when the NuGet packages are restored. (MonoGame.Content.Builder.Editor.Launcher)
How can I repair this problem?
/usr/share/dotnet/sdk/5.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(5,5): Error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. (MSB4186) (MonoGame.Framework.DesktopGL)
Hello everybody I've noticed one bug in last version. There is code:
if (keyboardState.IsKeyDown(Keys.R))
{
I start application 3 or 4 times and then nothing happens after R key pressing. I change R to T in code and application again works 3 or 4 times running. Then I return code to R key (Ctrl+Z) and application again works 3 or 4 times running. I even set breakpoint inside {...} block but thread does not come inside it. I think it's real bug
Hello, I'm new to MonoGame, and I'm trying to help my friend to port his game to Linux. The project originally uses "WindowsDX" instead of "DesktopGL". But in "DesktopGL" the game just crashes on certain calls to DrawUserPrimitives
. It crashes on both Linux and Windows (his machine). On Linux the only error message I get is "segmentation fault". Windows doesn't give any useful message either.
Here's what the call to DrawUserPrimitives
looks like:
_graphics.GraphicsDevice.DrawUserPrimitives(
PrimitiveType.TriangleList, vertices, 0, vertices.Length/3, new VertexDeclaration(CustomVertex.VertexElements));
Here's how CustomVertex
looks like: https://pastebin.com/buJE0A5C
How can I start to figure this out? What sort of mistake would expectedly lead to a segfault on OpenGL / MonoGame? I couldn't find anything that seemed relevant in the forums.
Thanks!
:point_up: Edit: Hello, I'm new to MonoGame, and I'm trying to help my friend to port his game to Linux. The project originally uses "WindowsDX" instead of "DesktopGL". But in "DesktopGL" the game just crashes on certain calls to DrawUserPrimitives
. It crashes on both Linux and Windows (his machine). On Linux the only error message I get is "segmentation fault". Windows doesn't give any useful message either.
Here's what the call to DrawUserPrimitives
looks like:
_graphics.GraphicsDevice.DrawUserPrimitives(
PrimitiveType.TriangleList, vertices, 0, vertices.Length/3, new VertexDeclaration(CustomVertex.VertexElements));
Here's how CustomVertex
looks like: https://pastebin.com/buJE0A5C
How can I start to figure this out? What sort of mistake would expectedly lead to a segfault on OpenGL / MonoGame? I couldn't find anything that seemed relevant in the forums.
I'm using MonoGame 3.8 on core 3.1.
Thanks!
Flush
-method? My friend uses it on WindowsDX, and I'm wondering whether I need to replace it with something. For now I just use #if DIRECTX
to disable it on DesktopGL
Flush
is odd - it's mentioned in the docs on the base GraphicsDevice
(https://docs.monogame.net/api/Microsoft.Xna.Framework.Graphics.GraphicsDevice.html#Microsoft_Xna_Framework_Graphics_GraphicsDevice_Flush), but it's not in the latest code on develop. I would file an issue for this
Flush
) and then each implementation has one named "Platform X" - for instance, PlatformFlush
DrawUserPrimitives
code, but apparently not possible, because MonoGame doesn't have PDBs on Nuget. I'll try to compile MonoGame myself
I was able to build from "develop" branch and add MonoGame as a project dependency like this:
<ProjectReference Include="..\MonoGame\MonoGame.Framework\MonoGame.Framework.DesktopGL.csproj" />
<ProjectReference Include="..\MonoGame\Tools\MonoGame.Content.Builder.Task\MonoGame.Content.Builder.Task.csproj" />
but now the Content won't get built
Okay, I decided to skip that idea, and wen't back to using Nuget packages. What I found out instead is that somehow using POSITION1 in the shader crashes it:
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
// float4 PosWorld: POSITION1;
float2 TexCoord : TEXCOORD0;
float2 Glow: TEXCOORD1;
};
If I remove comments from PosWorld, the game crashes. But that PosWorld is important, so I'm not sure what's the alternative
I am making a new VS Code extension for unity devloper Name :- unity-code Devloper:- Pradeep puri goswami https://files.gitter.im/57a6385440f3a6eec05e3e93/dhgM/Puri.png Link:- https://marketplace.visualstudio.com/items?itemName=PradeepPuriGoswami.unity-code&ssr=false#overview
Create Unity classes, methods, loop, and Statement easily
Features
All the Unity code snippets you need. This extension intends to be the complete collection of Unity snippets for Visual Studio Code.
It takes advantage of latest Visual Studio Code snippets features to create the code faster for you.
MonoBehaviour
Create game classes like MonoBehaviours, NetworkBehaviours and StateMachineBehaviours easily. Also create common methods like Start(), Update() or OnTriggerEnter2D() and log calls.
MonoBehaviour
Editor
Create Editor classes like Editor, EditorWindow and PropertyDrawer as easy as it can be.
Unity Editor
ScriptableObject
You never remember the property that goes with the ScriptableObject to create it via Unity create menu? Not a problem.
ScriptableObject
Installation
As in any Visual Studio Code Extension you have several options to install:
Enter the Visual Studio Code Marketplace, search for Unity Code (or enter directly on the extension page) and click on Install button.
Inside Visual Studio Code, enter in the Extensios panel, search for Unity Code and click on Install button
Run the following command in the Command Palette:
ext install purisahib.unity-code
All the snippets
Start typing the names to create the corresponding snippets.
Game classes:
MonoBehaviour
StateMachineBehaviour
NetworkBehaviour
ScriptableObject
Editor Classes:
Editor
Editor with Reorderable List (NEW)
EditorWindow
PropertyDrawer
ScriptableWizard
MonoBehaviour Methods:
Awake()
FixedUpdate()
LateUpdate()
OnAnimatorIK()
OnAnimatorMove()
OnApplicationFocus()
OnApplicationPause()
OnApplicationQuit()
OnAudioFilterRead()
OnBecameInvisible()
OnBecameVisible()
OnCollisionEnter()
OnCollisionEnter2D()
OnCollisionExit()
OnCollisionExit2D()
OnCollisionStay()
OnCollisionStay2D()
OnConnectedToServer()
OnControllerColliderHit()
OnDestroy()
OnDisable()
OnDisconnectedFromServer()
OnDrawGizmos()
OnDrawGizmosSelected()
OnEnable()
OnFailedToConnect()
OnFailedToConnectToMasterServer()
OnGUI()
OnJointBreak()
OnJointBreak2D()
OnMasterServerEvent()
OnMouseDown()
OnMouseDrag()
OnMouseEnter()
OnMouseExit()
OnMouseOver()
OnMouseUp()
OnMouseUpAsButton()
OnNetworkInstantiate()
OnParticleCollision()
OnParticleTrigger()
OnPlayerConnected()
OnPlayerDisconnected()
OnPostRender()
OnPreCull()
OnPreRender()
OnRenderImage()
OnRenderObject()
OnSerializeNetworkView()
OnServerInitialized()
OnTransformChildrenChanged()
OnTransformParentChanged()
OnTriggerEnter()
OnTriggerEnter2D()
OnTriggerExit()
OnTriggerExit2D()
OnTriggerStay()
OnTriggerStay2D()
OnValidate()
OnWillRenderObject()
Reset()
Start()
Update()
Debug class
Debug.DrawLine()
Debug.DrawRay()
Some useful code snippets:
Debug.Log() (type log)
Debug.LogError() (type logerror)
Debug.LogWarning() (type logwarning)
Debug.LogException() (type logexception)
Unity Keywords
C# Keywords
Loop, Statement etc.
special Words.
If you have any suggestions, open an issue in the Github project page and I'll add them as soon as I can :).
If you like the color theme of the previews, you can download it here: Base16 Ocean Dark Extended Theme.
Thank you for downloading this extension.
Enjoy!