void CreatComponentMarkerLess() { InformationObjectList informationObjectList = JsonUtility.FromJson <InformationObjectList>(PlayerPrefs.GetString(PropertiesModel.NameBDMarkerLessPlayerPrefab)); if (informationObjectList == null) { return; } foreach (InformationObject informationObject in informationObjectList.ListInformationObject) { patternMat = Imgcodecs.imread(informationObject.ImagePathMarkerLess); if (patternMat.total() > 0) { pattern = new Pattern(); PatternDetector patternDetector = new PatternDetector(null, null, null, true); patternDetector.buildPatternFromImage(patternMat, pattern); patternDetector.train(pattern); CreateComponent(informationObject, patternDetector); } } }
private MarkerIdControl() { informationObjectList = JsonUtility.FromJson <InformationObjectList>(PlayerPrefs.GetString(PropertiesModel.NameBDMarkerPlayerPrefab)); if (informationObjectList != null) { markerId = informationObjectList.ListInformationObject.Count; } }
void CreatComponentMarker() { InformationObjectList informationObjectList = JsonUtility.FromJson <InformationObjectList>(PlayerPrefs.GetString(PropertiesModel.NameBDMarkerPlayerPrefab)); if (informationObjectList == null) { return; } foreach (InformationObject informationObject in informationObjectList.ListInformationObject) { CreateComponent(informationObject, null); } }
private void Awake() { //DeletePlayerPrefs(); nameBDPlayerPrefab = PropertiesModel.NameBDMarkerLessPlayerPrefab; PropertiesModel.isMarker = isMarker; if (isMarker) { nameBDPlayerPrefab = PropertiesModel.NameBDMarkerPlayerPrefab; } informationObjectList = JsonUtility.FromJson <InformationObjectList>(PlayerPrefs.GetString(nameBDPlayerPrefab)); if (informationObjectList == null) { informationObjectList = new InformationObjectList(); } }