public void render(int pageIndex) { _pageNumber.text = (pageIndex + 1).ToString(); if (pageIndex == 0) { _style.selectedIndex = 0; //pic page } else if (pageIndex == 2) { if (_modelWrapper.wrapTarget == null) { Object prefab = Resources.Load("Role/npc3"); GameObject go = (GameObject)Object.Instantiate(prefab); go.transform.localPosition = new Vector3(0, 0, 1000); go.transform.localScale = new Vector3(120, 120, 120); go.transform.localEulerAngles = new Vector3(0, 100, 0); _modelWrapper.SetWrapTarget(go, true); } _style.selectedIndex = 2; //show a model } else { _style.selectedIndex = 1; //empty page } }
public static FGraph NewGraph(GraphArgs graphArgs = null) { var fGraph = NewT <FGraph, GGraph>(graphArgs); if (graphArgs != null) { if (graphArgs.wrapper != null) { var goWrapper = new GoWrapper(); goWrapper.SetWrapTarget(graphArgs.wrapper.target, graphArgs.wrapper.cloneMaterial); fGraph.SetNativeObject(goWrapper); } } return(fGraph); }