Giter Site home page Giter Site logo

itwin / imodel-unity-example Goto Github PK

View Code? Open in Web Editor NEW
21.0 17.0 9.0 19 MB

Example demonstrating use of iTwin.js with a Unity application

License: MIT License

JavaScript 46.47% TypeScript 4.81% C# 48.34% ShaderLab 0.38%
imodel unity imodeljs itwinjs digital-twin itwin

imodel-unity-example's People

Contributors

calebmshafer avatar dependabot[bot] avatar imodeljs-admin avatar mgooding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imodel-unity-example's Issues

Logger Issue

Enable/Disable logger in whole Unity project, any document plz share

Imodel Design Review

Is there any API or ECSQL query to get the project hierarchy data that is coming in connect-imodelweb.bentley.com design review widget.

We want that hierarchy data

Port No

I am adding port from tsconfig file as
{
"extends": "./node_modules/@bentley/build-tools/tsconfig-base.json",
"portNo":3001,
"compilerOptions": {
"skipLibCheck": true,
"outDir": "./lib",
"baseUrl": "./node_modules/",
"types": [
"node"
]
},
"include": [
"./src/**/*.ts"
]
}

and add in main.ts
import * as configData from "../tsconfig.json";
Getting following error
Cannot find module '../tsconfig.json'. Consider using '--resolveJsonModule' to import module with '.json' extension

want to use port mentined in tsconfig and use for server start

Workflow doesn't work

hi guys, I'm trying to reproduce your workflow to view ITwin models with Unity. I followed the YouTube tutorial step by step but the process doesn't work for me. I leave you below the steps that I perform with the cmd and the consequent errors that derive from it:


C:\Users\davpo>git clone https://github.com/imodeljs/imodel-unity-example.git
fatal: destination path 'imodel-unity-example' already exists and is not an empty directory.

C:\Users\davpo>git clone https://github.com/imodeljs/imodel-unity-example.git
Cloning into 'imodel-unity-example'...
remote: Enumerating objects: 273, done.
remote: Counting objects: 100% (82/82), done.
remote: Compressing objects: 100% (63/63), done.
Rremote: Total 273 (delta 43), reused 43 (delta 19), pack-reused 191eceiving objects:  88% (241/273),
Receiving objects:  89% (243/273),
Receiving objects: 100% (273/273), 17.19 MiB | 7.40 MiB/s, done.
Resolving deltas: 100% (129/129), done.

C:\Users\davpo>cd C:\Users\davpo\imodel-unity-example\node

C:\Users\davpo\imodel-unity-example\node>dir
 Il volume nell'unità C è OS
 Numero di serie del volume: 5409-411F

 Directory di C:\Users\davpo\imodel-unity-example\node

22/07/2021  12:18    <DIR>          .
22/07/2021  12:18    <DIR>          ..
22/07/2021  12:18               809 ci_pipeline.yml
22/07/2021  12:18        33,570,816 demo.bim
22/07/2021  12:18             2,487 IModelRpc.proto
22/07/2021  12:18           722,534 package-lock.json
22/07/2021  12:18             1,678 package.json
22/07/2021  12:18         3,627,520 protoc.exe
22/07/2021  12:18    <DIR>          src
22/07/2021  12:18               273 tsconfig.json
22/07/2021  12:18                53 tslint.json
               8 File     37,926,170 byte
               3 Directory  88,808,083,456 byte disponibili

C:\Users\davpo\imodel-unity-example\node>npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

> @bentley/[email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\@bentley\imodeljs-native
> node ./installNativePlatform.js

npm install --no-save @bentley/[email protected]
+ @bentley/[email protected]
updated 1 package in 5.508s
found 0 vulnerabilities




> [email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\highlight.js
> node deprecated.js

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  Verion 9 of Highlight.js has reached EOL.  It will no longer
  be supported or receive security updates in the future.
  Please upgrade to version 10 or encourage your indirect
  dependencies to do so.

  For more info:

  https://github.com/highlightjs/highlight.js/issues/2877
  https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_UPGRADE.md

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

> [email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\oidc-client\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall C:\Users\davpo\imodel-unity-example\node\node_modules\protobufjs
> node scripts/postinstall

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\mocha\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 896 packages from 858 contributors and audited 905 packages in 33.459s

92 packages are looking for funding
  run `npm fund` for details

found 6 vulnerabilities (2 low, 4 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

C:\Users\davpo\imodel-unity-example\node>npm run build

> imodel-unity-example@ build C:\Users\davpo\imodel-unity-example\node
> cpx src/IModelRpc_pb.js lib/ && npm run build-code 1>&2


> imodel-unity-example@ build-code C:\Users\davpo\imodel-unity-example\node
> tsc 1>&2


C:\Users\davpo\imodel-unity-example\node>npm start

> imodel-unity-example@ start C:\Users\davpo\imodel-unity-example\node
> node lib/Main.js --snapshotFile=demo.bim

internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module '@bentley/presentation-common'
Require stack:
- C:\Users\davpo\imodel-unity-example\node\node_modules\@bentley\electron-manager\lib\common\ElectronRpcManager.js
- C:\Users\davpo\imodel-unity-example\node\node_modules\@bentley\electron-manager\lib\backend\ElectronHost.js
- C:\Users\davpo\imodel-unity-example\node\node_modules\@bentley\electron-manager\lib\ElectronBackend.js
- C:\Users\davpo\imodel-unity-example\node\lib\IModelHubDownload.js
- C:\Users\davpo\imodel-unity-example\node\lib\Main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (C:\Users\davpo\imodel-unity-example\node\node_modules\@bentley\electron-manager\lib\common\ElectronRpcManager.js:12:31)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\davpo\\imodel-unity-example\\node\\node_modules\\@bentley\\electron-manager\\lib\\common\\ElectronRpcManager.js',
    'C:\\Users\\davpo\\imodel-unity-example\\node\\node_modules\\@bentley\\electron-manager\\lib\\backend\\ElectronHost.js',
    'C:\\Users\\davpo\\imodel-unity-example\\node\\node_modules\\@bentley\\electron-manager\\lib\\ElectronBackend.js',
    'C:\\Users\\davpo\\imodel-unity-example\\node\\lib\\IModelHubDownload.js',
    'C:\\Users\\davpo\\imodel-unity-example\\node\\lib\\Main.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! imodel-unity-example@ start: `node lib/Main.js --snapshotFile=demo.bim`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the imodel-unity-example@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\davpo\AppData\Roaming\npm-cache\_logs\2021-07-22T10_20_58_787Z-debug.log

C:\Users\davpo\imodel-unity-example\node>

Can you tell me where I'm wrong?

Repository move announcement

On Monday, October 4th, the imodel-unity-example repo will be transferred to the iTwin Platform organization on Github.

All branches, pull requests, issues, and discussions will be transferred along with the repository, and all links to the old repository will redirect to the new repository which will be found at https://github.com/iTwin/imodel-unity-example.

Once the move is complete, we recommend that you update the git origin in your local copy of the repo to the new repository location using:

git remote set-url origin https://github.com/iTwin/imodel-unity-example.git

Node part does not work on MAC

Node part does not work on MAC though it perfectly worked on windows
On mac when I try to npm build it says Faild at the imodel-unity--example@ build script and many other error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.