小编Kna*_*ina的帖子

是否可以在没有 Unity 编辑器的情况下创建资源包?

我们需要在服务器上自动创建资源包,但在服务器上安装 Unity 并通过命令行运行它不太适合我们的服务器设计。所以我们想知道是否还有其他方法来创建资源包。您可以从常规 .Net 运行的 .Net 库将是最佳选择,但我们对您可能拥有的任何解决方案感兴趣。

unity-game-engine assetbundle

5
推荐指数
0
解决办法
2561
查看次数

如何在Unity3d中按平面切割网格

我想用平面切割网格。尝试这个代码,但只得到切割网格的一部分。

截图1

截图2

public void SliceIt()
{
    Vector3[] vertices = mesh.vertices;

    Transform clone = clone = ((Transform)Instantiate(transform, transform.position + new Vector3(0, 0.25f, 0), transform.rotation));

    Mesh meshSlice  = clone.GetComponent<MeshFilter>().sharedMesh;
    Vector3[] verticesSlice = meshSlice.vertices;

    List<Vector3> verticesSlice2 = new List<Vector3>();

    Mesh cutplanemesh  = cutplane.GetComponent<MeshFilter>().sharedMesh;
    Vector3[] cutplanevertices = cutplanemesh.vertices;

    p1 = cutplane.TransformPoint(cutplanevertices[40]);
    p2 = cutplane.TransformPoint(cutplanevertices[20]);
    p3 = cutplane.TransformPoint(cutplanevertices[0]);
    var myplane = new Plane(p1, p2, p3);

    for (var i = 0; i < vertices.Length; i++)
    {
        var tmpverts = transform.TransformPoint(vertices[i]); // original object vertices

        if …
Run Code Online (Sandbox Code Playgroud)

mesh unity-game-engine

5
推荐指数
1
解决办法
1万
查看次数

我在android应用程序中遇到错误:无法获取上下文:EGL_BAD_NATIVE_WINDOW:NativeWindowType参数未引用有效的本机窗口

我构建unity3d并在本机android应用程序中运行它。当我打开本机android对话框时出现错误:无法获取上下文:EGL_BAD_NATIVE_WINDOW:NativeWindowType参数未引用有效的本机窗口。

android unity-game-engine

5
推荐指数
0
解决办法
728
查看次数

在Unity3d中如何检测UI上的触摸?

在make Unity3d移动应用程序中.我有一个问题:如何检测UI上的触摸?

我试试这个(但现在工作)

UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject()
Run Code Online (Sandbox Code Playgroud)

还有这个

private static List<RaycastResult> tempRaycastResults = new List<RaycastResult>();

public bool PointIsOverUI(float x, float y)
{
    var eventDataCurrentPosition = new PointerEventData(EventSystem.current);

    eventDataCurrentPosition.position = new Vector2(x, y);

    tempRaycastResults.Clear();

    EventSystem.current.RaycastAll(eventDataCurrentPosition, tempRaycastResults);

    return tempRaycastResults.Count > 0;
}
Run Code Online (Sandbox Code Playgroud)

touch unity-game-engine

4
推荐指数
1
解决办法
1万
查看次数

如何获得Android键盘的高度?

如何获得Android键盘的高度?

我尝试:

KeyboardView keyboardView = new KeyboardView(_activity.getApplicationContext(), null);
Log.i("","xxx height " + keyboardCustom.mKeyboardView.getHeight());
            Log.i("","xxx height " + keyboardCustom.mKeyboardView.getBottom());
Run Code Online (Sandbox Code Playgroud)

但总是得到0.

keyboard android

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

unity-game-engine ×4

android ×2

assetbundle ×1

keyboard ×1

mesh ×1

touch ×1