void OnPostRender() { Live2DModelUnity live2DModel = (Live2DModelUnity)_model.getLive2DModel(); var w = live2DModel.getCanvasWidth(); var h = live2DModel.getCanvasHeight(); L2DModelMatrix matrix = new L2DModelMatrix(w, h); matrix.setWidth(_w); matrix.setCenterPosition(0.5f, 0.5f); matrix.setX(_x); matrix.setY(_y); Matrix4x4 m1 = Matrix4x4.identity; float[] m2 = matrix.getArray(); for (int i = 0; i < 16; i++) { m1[i] = m2[i]; } live2DModel.setMatrix(m1); //_model.Update();_model.Draw 中有调用 UpdateMouth(); live2DModel.update(); _model.Draw(Live2dViewType); }
private void OnRenderObject() { if (_model == null) { return; } _model.Draw(); }