Unity "Convert to Entity" does not work (rendering) with "Mesh Mesh Render" for animations

I'm trying to make a game with ECS and Unity's Job System.

I came across the following problem: Convert to entity does not support Skinned Mesh Renderer. It does not make the mesh. I need it for animations.

On the positive side, Game Object Entity renders the jersey mesh. The disadvantage is that it does not support Physics Shape and Physics Body. Convert to entity does.

I use Physics Shape and Physics Body for physics.

Could someone tell me what options are available to me?

unity – Problem of character positioning in Unity3d CarController

I use the standard characterController and Car unit active components and put an empty gaming object on the car where the camera should be placed when I'm inside the car. The empty gameobject calls "Driver". The character controller has a void called "Head" where his head is.

When I get in the car, I do the following operation

GameObject car = GameObject.Find ("Car");
transform.position = car.transform.Find ("Driver"). transform.position + Vector3.up * 1;
transform.parent = car.transform.Find ("Driver"). transform;
Camera.main.transform.position = car.transform.Find ("Driver"). transform.position;
Camera.main.transform.rotation = car.transform.Find ("Driver"). Transform.rotation; 

and to get out, I use the following

GameObject car = GameObject.Find ("Car");
transform.position = car.transform.position;
transform.parent = null;
transform.rotation = Quaternion.identity;
Camera.main.transform.position = transform.Find ("Head"). transform.position;

My problem is that when I get in the car and go out again, the character is placed in the position where I entered the car, so he does not seem to update his position with the movement of the car.

What am I doing wrong?

Thanks in advance

collision detection – Unity Collider2D – Know the type of collider ob object collider with the other object

I have my GameObject that represents a soldier in my game. He has the following colliders:

  • 1st BoxCollider2D in the child named "sword". Is Trigger checked? Tag = sword. This collider is activated when the player attacks and deactivates otherwise.
  • 2nd BoxCollider2D in parent GameObject. Trigger is unchecked, since it is the body. Always on.

When the (1st) collider's sword collides with the body (2nd) collider, damage occurs. Until now, everything is working well. here is OnTriggerEnter2D function that I have:

OnTriggerEnter2D (Collision2D)
{
if (collision is BoxCollider2D)
{
Debug.Log ($ "{this.name} collided with {collision.name}");

if (collision == null || collision.tag == Constants.TAG_WEAPONS
|| collision.tag == Constants.TAG_SIGHT)
{
return;
}

if (collision.GetComponent() .AreEnemies (this)
{
Debug.Log ($ "{this.name} attacked with {collision.name}");

Attack (collision.GetComponent());
}
other
{
return;
}
}
}

Now, I want my unit to look for enemies in a given range. I added a new collider:

  • 3rd CircleCollider2D at the child named "view". Is Trigger checked? Tag = Sight. Always on.

Now, when the (3rd) sight collider collides with the body collider, damage is triggered and the unit collides with the collider at sight. That's because I block the damage in one way with the condition if (collision is BoxCollider2D) but not the other collision that occurs at the same time.

If I can discriminate collision of CircleCollider2D in BoxCollider2D, I can remove the attack function. However, I do not see how to do it.
My question is: how do I know which type of Collider2D my object collides with the other?

I am open to other suggestions if this is impossible.

Here is an image of the situation

c # – How to debug Azure spatial anchors with Unity on an Android device?

I'm building an AR application that was already hard to debug because instant preview refuses to work through wifi and USB debugging prevents the phone's camera from displaying on the phone itself. Now I am about to integrate Azure Spatial Anchors and I do not seem to be able to play in the editor. I receive the message:

DllNotFoundException: azurespatialanchorsndk
Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession..ctor () (at Assets / AzureSpatialAnchorsPlugin / Plugins / Common / AzureSpatialAnchorsBridge.cs: 6864)
SpatialAnchors.GetCloudManager () (at Assets / Scripts / SpatialAnchors.cs: 60)
test.Start () (at Assets / tester.cs: 18)

What are my options for building a centralized server architecture for a Unity game?

I have already made several offline games and I would like to create my first online game. I have very basic knowledge of the server structure.

The game is a multiplayer RTS game, with ONE server (if possible in C #), where the player can create a base, attack another player and move into a world. it's real-time, but at a slow pace, so not a lot of action, and every time a user moves, it takes an hour to move it. The game is planned for Android / iOS and (maybe) but not at all for the moment, web.

The game itself is easy, but the server, I do not know where to start and I fought over the last 3 days to find information and answer my question. Most of the examples I've found are P2P / client-hosted servers. This does not apply to me. I want a single server that runs outside Unity and can run on a computer in stand-alone mode. My questions problems are.

1) For a mobile game, I've seen in some articles that UDP TCP / Socket is not available in 3g? Is it true ? If so, what should I use? I was thinking about websocket since maybe I'm creating a web version, but I do not know if it's a good idea, and apparently it's not built into Unity.

2) Related to my 2) Is there a c # library that works in Unity and that would suit my gaming needs? a user would probably load a card and interact about 20 times with the server during the game. I believe that a simple server that only receives and sends messages is enough, but I do not know what to use. Start from zero? so what should I use, TCP? Jack? WebSocket?

3) Should I use a photon? I saw that it's free to test up to 20CCU, and since probably for the next 6 months I'll be alone on it, it's good, so at the exit say I have 100 players, it's not is not so expensive. Is this a viable solution? I found it a bit excessive for my needs, but it seems documented and easy to get started. Will I still learn things if I "cheat" like this?

Thank you for your time

Unity – GameObject continues to adapt to the size of the camera

I'm moving my gameobject when I drag it on the screen. But my current problem is that when I press the game to test the game, the object of the game adapts to the size of my camera on the Y. The camera is set by default to a size of "5" but mine on "5.194104". The GameObject will position itself on this position during playback. I can not understand why. Instead of staying at -4.5f as in Vector3, it switches to the size of the camera.

Here's what I've

`using System.Collections;

using System.Collections.Generic;

using UnityEngine;

Public class PaddlePosition: MonoBehaviour
{

    // Start is called before the first update of the frame
empty Start ()
{

}

// The update is called once per image
void Update ()
{
OnFingerDrag ();
}

private canceled OnFingerDrag ()
{
Vector3 fingerPosition = new Vector3 (Input.mousePosition.x, -4.5f, 0.0f);
Vector3 objectPosition = Camera.main.ScreenToWorldPoint (fingerPosition);

transform.position = objectPosition;
}

} `

enter the description of the image here

I have changed my version of Unity and Vuforia and I have a compilation error

What should I do to solve the problem?

enter the description of the image here

How does the Unity Collider work?

From waht I understand, Collider.Bounds are the sides or the limits of the GameObject collider (at least for a cube with a BoxCollider). But I got a result that I did not expect when I tried to move a cube down continuously and draw boundaries with lines. When moving frame by frame, the collider's boundaries did not seem to delineate the cube (or at least that's what my test shows, if my test is correct).

Here are 3 screenshots:

enter the description of the image here
enter the description of the image here
enter the description of the image here

To do this, I created a new 3D project, added a cube, then added a single script, and added that script to the cube. The entire script is:

using UnityEngine;

Public class NewBehaviourScript: MonoBehaviour
{
The velocity of the vector3;

// Start is called before the first update of the frame
empty Start ()
{
velocity = Vector3.zero;
}

// The update is called once per image
void Update ()
{
velocity.y + = -0.5f;
transform.Translate (velocity);

Bounds bounds = GetComponent() .Bornes;
Debug.DrawLine (new Vector3 (bounds.min.x, bounds.min.y, bounds.min.z), new Vector3 (bounds.max.x, bounds.min.y, bounds.min.z), Color. red);
Debug.DrawLine (new Vector3 (bounds.max.x, bounds.min.y, bounds.min.z), new Vector3 (bounds.max.x, bounds.max.y, bounds.min.z), Color. red);
Debug.DrawLine (new Vector3 (bounds.max.x, bounds.max.y, bounds.min.z), new Vector3 (bounds.min.x, bounds.max.y, bounds.min.z), Color. red);
Debug.DrawLine (new Vector3 (bounds.min.x, bounds.max.y, bounds.min.z), new Vector3 (bounds.min.x, bounds.min.y, bounds.min.z), Color. red);
Debug.DrawLine (bounds.min, bounds.max, Color.red);
}
}

Do not I understand something or do I do something wrong?

Unity – Why Raycast Does Not Work With Mesh Collider

I have combined several meshes of cube to obtain a single mesh. when he tries to click on it and return to raycast.point, nothing happens (with a mesh collider). when I put a box collider on it, it works well.

what I'm trying to do is get the coordinate of a cube in a larger mesh. How am I supposed to do it?
How can I get this single cube location in a mesh combination by clicking on it?

Unity – Text Conflict in Unity2019.1.5f1

I have a problem with Textmesh Pro in my project. I had originally received it from the Asset store a few months ago. More recently, I have deleted and downloaded it from the package manager. However, now, in my scripts, the following error is displayed when using the TextMeshPro class:

The 'TextMeshPro' type & # 39; in & # 39; / Users / unityj / Documents / unity vscode/VSCode/FirstGame/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshPro.cs' conflicts with the imported type "TextMeshPro" in & # 39; Unity.TextMeshPro, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null. Using the type defined in & # 39; / Users / unityj / Documents / unity vscode/VSCode/FirstGame/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshPro.cs&#39 ;. (CS0436) [Assembly-CSharp]

I tried to uninstall the package via the package manager, removing the package folders, removing anything that mentioned 'TextMesh Pro'. and & # 39; TMPro & # 39 ;, reimporting everything and reinstalling it, but I still get the error. Once TextMesh Pro has been uninstalled, it is impossible to access the class.

The asset serialization mode is set to & quot; Forced Text & # 39; and I set .Net4.x in the player settings.

Doing a new project does not reproduce the problem, so I know it's a problem specific to my project, but I do not know where to start. Any suggestion would be appreciated.