diff --git a/.gitignore b/.gitignore index bbb79ad6a9..f5605d7090 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ tools/jsdoc/package-lock.json # ignore unneeded unity project files for avatar exporter tools/unity-avatar-exporter/Library +tools/unity-avatar-exporter/Logs tools/unity-avatar-exporter/Packages tools/unity-avatar-exporter/ProjectSettings tools/unity-avatar-exporter/Temp diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6d870b58d6..b6b4e8e2a1 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -170,6 +170,7 @@ #include "scripting/Audio.h" #include "networking/CloseEventSender.h" #include "scripting/TestScriptingInterface.h" +#include "scripting/PlatformInfoScriptingInterface.h" #include "scripting/AssetMappingsScriptingInterface.h" #include "scripting/ClipboardScriptingInterface.h" #include "scripting/DesktopScriptingInterface.h" @@ -6988,6 +6989,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe scriptEngine->registerGlobalObject("Test", TestScriptingInterface::getInstance()); } + scriptEngine->registerGlobalObject("PlatformInfo", PlatformInfoScriptingInterface::getInstance()); scriptEngine->registerGlobalObject("Rates", new RatesScriptingInterface(this)); // hook our avatar and avatar hash map object into this script engine @@ -8705,6 +8707,14 @@ void Application::updateLoginDialogOverlayPosition() { } } +bool Application::hasRiftControllers() { + return PluginUtils::isOculusTouchControllerAvailable(); +} + +bool Application::hasViveControllers() { + return PluginUtils::isViveControllerAvailable(); +} + void Application::onDismissedLoginDialog() { _loginDialogPoppedUp = false; loginDialogPoppedUp.set(false); @@ -8923,6 +8933,10 @@ void Application::copyToClipboard(const QString& text) { QApplication::clipboard()->setText(text); } +QString Application::getGraphicsCardType() { + return GPUIdent::getInstance()->getName(); +} + #if defined(Q_OS_ANDROID) void Application::beforeEnterBackground() { auto nodeList = DependencyManager::get(); diff --git a/interface/src/Application.h b/interface/src/Application.h index 2e40a55df0..dc30c3c22c 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -326,6 +326,10 @@ public: void createLoginDialogOverlay(); void updateLoginDialogOverlayPosition(); + // Check if a headset is connected + bool hasRiftControllers(); + bool hasViveControllers(); + #if defined(Q_OS_ANDROID) void beforeEnterBackground(); void enterBackground(); @@ -459,6 +463,8 @@ public slots: void changeViewAsNeeded(float boomLength); + QString getGraphicsCardType(); + private slots: void onDesktopRootItemCreated(QQuickItem* qmlContext); void onDesktopRootContextCreated(QQmlContext* qmlContext); @@ -787,6 +793,5 @@ private: bool _showTrackedObjects { false }; bool _prevShowTrackedObjects { false }; - }; #endif // hifi_Application_h diff --git a/interface/src/scripting/PlatformInfoScriptingInterface.cpp b/interface/src/scripting/PlatformInfoScriptingInterface.cpp new file mode 100644 index 0000000000..b6e4df0d40 --- /dev/null +++ b/interface/src/scripting/PlatformInfoScriptingInterface.cpp @@ -0,0 +1,135 @@ +// +// Created by Nissim Hadar on 2018/12/28 +// Copyright 2013-2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#include "PlatformInfoScriptingInterface.h" +#include "Application.h" + +#include + +#ifdef Q_OS_WIN +#include +#elif defined Q_OS_MAC +#include +#endif + +PlatformInfoScriptingInterface* PlatformInfoScriptingInterface::getInstance() { + static PlatformInfoScriptingInterface sharedInstance; + return &sharedInstance; +} + +QString PlatformInfoScriptingInterface::getOperatingSystemType() { +#ifdef Q_OS_WIN + return "WINDOWS"; +#elif defined Q_OS_MAC + return "MACOS"; +#else + return "UNKNOWN"; +#endif +} + +QString PlatformInfoScriptingInterface::getCPUBrand() { +#ifdef Q_OS_WIN + int CPUInfo[4] = { -1 }; + unsigned nExIds, i = 0; + char CPUBrandString[0x40]; + // Get the information associated with each extended ID. + __cpuid(CPUInfo, 0x80000000); + nExIds = CPUInfo[0]; + + for (i = 0x80000000; i <= nExIds; ++i) { + __cpuid(CPUInfo, i); + // Interpret CPU brand string + if (i == 0x80000002) { + memcpy(CPUBrandString, CPUInfo, sizeof(CPUInfo)); + } else if (i == 0x80000003) { + memcpy(CPUBrandString + 16, CPUInfo, sizeof(CPUInfo)); + } else if (i == 0x80000004) { + memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo)); + } + } + + return CPUBrandString; +#elif defined Q_OS_MAC + FILE* stream = popen("sysctl -n machdep.cpu.brand_string", "r"); + + std::ostringstream hostStream; + while (!feof(stream) && !ferror(stream)) { + char buf[128]; + int bytesRead = fread(buf, 1, 128, stream); + hostStream.write(buf, bytesRead); + } + + return QString::fromStdString(hostStream.str()); +#else + return QString("NO IMPLEMENTED"); +#endif +} + +unsigned int PlatformInfoScriptingInterface::getNumLogicalCores() { + + return std::thread::hardware_concurrency(); +} + +int PlatformInfoScriptingInterface::getTotalSystemMemoryMB() { +#ifdef Q_OS_WIN + MEMORYSTATUSEX statex; + statex.dwLength = sizeof (statex); + GlobalMemoryStatusEx(&statex); + return statex.ullTotalPhys / 1024 / 1024; +#elif defined Q_OS_MAC + FILE* stream = popen("sysctl -a | grep hw.memsize", "r"); + + std::ostringstream hostStream; + while (!feof(stream) && !ferror(stream)) { + char buf[128]; + int bytesRead = fread(buf, 1, 128, stream); + hostStream.write(buf, bytesRead); + } + + QString result = QString::fromStdString(hostStream.str()); + QStringList parts = result.split(' '); + return (int)(parts[1].toDouble() / 1024 / 1024); +#else + return -1; +#endif +} + +QString PlatformInfoScriptingInterface::getGraphicsCardType() { +#ifdef Q_OS_WIN + return qApp->getGraphicsCardType(); +#elif defined Q_OS_MAC + FILE* stream = popen("system_profiler SPDisplaysDataType | grep Chipset", "r"); + + std::ostringstream hostStream; + while (!feof(stream) && !ferror(stream)) { + char buf[128]; + int bytesRead = fread(buf, 1, 128, stream); + hostStream.write(buf, bytesRead); + } + + QString result = QString::fromStdString(hostStream.str()); + QStringList parts = result.split('\n'); + for (int i = 0; i < parts.size(); ++i) { + if (parts[i].toLower().contains("radeon") || parts[i].toLower().contains("nvidia")) { + return parts[i]; + } + } + + // unkown graphics card + return "UNKNOWN"; +#else + return QString("NO IMPLEMENTED"); +#endif +} + +bool PlatformInfoScriptingInterface::hasRiftControllers() { + return qApp->hasRiftControllers(); +} + +bool PlatformInfoScriptingInterface::hasViveControllers() { + return qApp->hasViveControllers(); +} diff --git a/interface/src/scripting/PlatformInfoScriptingInterface.h b/interface/src/scripting/PlatformInfoScriptingInterface.h new file mode 100644 index 0000000000..3ed57965c9 --- /dev/null +++ b/interface/src/scripting/PlatformInfoScriptingInterface.h @@ -0,0 +1,70 @@ +// +// Created by Nissim Hadar on 2018/12/28 +// Copyright 2013-2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_PlatformInfoScriptingInterface_h +#define hifi_PlatformInfoScriptingInterface_h + +#include + +class QScriptValue; + +class PlatformInfoScriptingInterface : public QObject { + Q_OBJECT + +public slots: + static PlatformInfoScriptingInterface* getInstance(); + + /**jsdoc + * Returns the Operating Sytem type + * @function Test.getOperatingSystemType + * @returns {string} "WINDOWS", "MACOS" or "UNKNOWN" + */ + QString getOperatingSystemType(); + + /**jsdoc + * Returns the CPU brand + *function PlatformInfo.getCPUBrand() + * @returns {string} brand of CPU + */ + QString getCPUBrand(); + + /**jsdoc + * Returns the number of logical CPU cores + *function PlatformInfo.getNumLogicalCores() + * @returns {int} number of logical CPU cores + */ + unsigned int getNumLogicalCores(); + + /**jsdoc + * Returns the total system memory in megabyte + *function PlatformInfo.getTotalSystemMemory() + * @returns {int} size of memory in megabytes + */ + int getTotalSystemMemoryMB(); + + /**jsdoc + * Returns the graphics card type + * @function Test.getGraphicsCardType + * @returns {string} graphics card type + */ + QString getGraphicsCardType(); + + /**jsdoc + * Returns true if Oculus Rift is connected (looks for hand controllers) + * @function Window.hasRift + * @returns {boolean} true if running on Windows, otherwise false.*/ + bool hasRiftControllers(); + + /**jsdoc + * Returns true if HTC Vive is connected (looks for hand controllers) + * @function Window.hasRift + * @returns {boolean} true if running on Windows, otherwise false.*/ + bool hasViveControllers(); +}; + +#endif // hifi_PlatformInfoScriptingInterface_h diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index 476372160e..2942de0ba4 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -55,6 +55,7 @@ WebEntityRenderer::ContentType WebEntityRenderer::getContentType(const QString& const QUrl url(urlString); auto scheme = url.scheme(); if (scheme == HIFI_URL_SCHEME_ABOUT || scheme == HIFI_URL_SCHEME_HTTP || scheme == HIFI_URL_SCHEME_HTTPS || + scheme == URL_SCHEME_DATA || urlString.toLower().endsWith(".htm") || urlString.toLower().endsWith(".html")) { return ContentType::HtmlContent; } diff --git a/libraries/networking/src/NetworkingConstants.h b/libraries/networking/src/NetworkingConstants.h index 302e0efa02..117a41c976 100644 --- a/libraries/networking/src/NetworkingConstants.h +++ b/libraries/networking/src/NetworkingConstants.h @@ -33,6 +33,7 @@ namespace NetworkingConstants { const QString HIFI_URL_SCHEME_ABOUT = "about"; const QString URL_SCHEME_HIFI = "hifi"; const QString URL_SCHEME_HIFIAPP = "hifiapp"; +const QString URL_SCHEME_DATA = "data"; const QString URL_SCHEME_QRC = "qrc"; const QString HIFI_URL_SCHEME_FILE = "file"; const QString HIFI_URL_SCHEME_HTTP = "http"; diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 9b99e114a7..9aca2bf3e6 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -469,12 +469,28 @@ void TestRunner::runInterfaceWithTestScript() { url = "hifi://localhost"; } + QString deleteScript = + QString("https://raw.githubusercontent.com/") + _user + "/hifi_tests/" + _branch + "/tests/utils/deleteNearbyEntities.js"; + QString testScript = QString("https://raw.githubusercontent.com/") + _user + "/hifi_tests/" + _branch + "/tests/testRecursive.js"; QString commandLine; #ifdef Q_OS_WIN - QString exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; + QString exeFile; + // First, run script to delete any entities in test area + // Note that this will run to completion before continuing + exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; + commandLine = "start /wait \"\" " + exeFile + + " --url " + url + + " --no-updater" + + " --no-login-suggestion" + " --testScript " + deleteScript + " quitWhenFinished"; + + system(commandLine.toStdString().c_str()); + + // Now run the test suite + exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; commandLine = exeFile + " --url " + url + " --no-updater" + @@ -485,10 +501,6 @@ void TestRunner::runInterfaceWithTestScript() { _interfaceWorker->setCommandLine(commandLine); emit startInterface(); #elif defined Q_OS_MAC - // On The Mac, we need to resize Interface. The Interface window opens a few seconds after the process - // has started. - // Before starting interface, start a process that will resize interface 10s after it opens - // This is performed by creating a bash script that runs to processes QFile script; script.setFileName(_workingFolder + "/runInterfaceTests.sh"); if (!script.open(QIODevice::WriteOnly | QIODevice::Text)) { @@ -498,7 +510,20 @@ void TestRunner::runInterfaceWithTestScript() { } script.write("#!/bin/sh\n\n"); - + + // First, run script to delete any entities in test area + commandLine = + "open -W \"" +_installationFolder + "/interface.app\" --args" + + " --url " + url + + " --no-updater" + + " --no-login-suggestion" + " --testScript " + deleteScript + " quitWhenFinished\n"; + + script.write(commandLine.toStdString().c_str()); + + // On The Mac, we need to resize Interface. The Interface window opens a few seconds after the process + // has started. + // Before starting interface, start a process that will resize interface 10s after it opens commandLine = _workingFolder +"/waitForStart.sh interface && sleep 10 && " + _workingFolder +"/setInterfaceSizeAndPosition.sh &\n"; script.write(commandLine.toStdString().c_str()); @@ -509,7 +534,7 @@ void TestRunner::runInterfaceWithTestScript() { " --no-login-suggestion" " --testScript " + testScript + " quitWhenFinished" + " --testResultsLocation " + _snapshotFolder + - " && " + _workingFolder +"/waitForFinish.sh interface"; + " && " + _workingFolder +"/waitForFinish.sh interface\n"; script.write(commandLine.toStdString().c_str()); diff --git a/tools/nitpick/src/ui/HelpWindow.cpp b/tools/nitpick/src/ui/HelpWindow.cpp deleted file mode 100644 index 21c5d9d375..0000000000 --- a/tools/nitpick/src/ui/HelpWindow.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// -// HelpWindow.cpp -// -// Created by Nissim Hadar on 8 Aug 2017. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// -#include "HelpWindow.h" - -HelpWindow::HelpWindow(QWidget *parent) { - setupUi(this); -} diff --git a/tools/nitpick/src/ui/HelpWindow.h b/tools/nitpick/src/ui/HelpWindow.h deleted file mode 100644 index 5ce91b360d..0000000000 --- a/tools/nitpick/src/ui/HelpWindow.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// HelpWindow.h -// -// Created by Nissim Hadar on 8 Aug 2017. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// -#ifndef hifi_HelpWindow_h -#define hifi_HelpWindow_h - -#include "ui_HelpWindow.h" - -class HelpWindow : public QDialog, public Ui::HelpWindow { - Q_OBJECT - -public: - HelpWindow(QWidget* parent = Q_NULLPTR); -}; - -#endif \ No newline at end of file diff --git a/tools/nitpick/src/ui/HelpWindow.ui b/tools/nitpick/src/ui/HelpWindow.ui deleted file mode 100644 index 1ce6e8c321..0000000000 --- a/tools/nitpick/src/ui/HelpWindow.ui +++ /dev/null @@ -1,46 +0,0 @@ - - - HelpWindow - - - Qt::ApplicationModal - - - - 0 - 0 - 696 - 546 - - - - Nitpick Help - - - - - 50 - 50 - 581 - 381 - - - - - - - 300 - 460 - 93 - 28 - - - - Close - - - - - - - diff --git a/tools/nitpick/src/ui/Nitpick.cpp b/tools/nitpick/src/ui/Nitpick.cpp index cdd2ff89d9..38124e1f39 100644 --- a/tools/nitpick/src/ui/Nitpick.cpp +++ b/tools/nitpick/src/ui/Nitpick.cpp @@ -15,6 +15,8 @@ #include #endif +#include + Nitpick::Nitpick(QWidget* parent) : QMainWindow(parent) { _ui.setupUi(this); @@ -36,10 +38,7 @@ Nitpick::Nitpick(QWidget* parent) : QMainWindow(parent) { _ui.statusLabel->setText(""); _ui.plainTextEdit->setReadOnly(true); - setWindowTitle("Nitpick - v1.2"); - - // Coming soon to a nitpick near you... - //// _helpWindow.textBrowser->setText() + setWindowTitle("Nitpick - v1.3"); } Nitpick::~Nitpick() { @@ -287,7 +286,7 @@ void Nitpick::about() { } void Nitpick::content() { - _helpWindow.show(); + QDesktopServices::openUrl(QUrl("https://github.com/highfidelity/hifi/blob/master/tools/nitpick/README.md")); } void Nitpick::setUserText(const QString& user) { diff --git a/tools/nitpick/src/ui/Nitpick.h b/tools/nitpick/src/ui/Nitpick.h index 21b917654b..08e41e0a90 100644 --- a/tools/nitpick/src/ui/Nitpick.h +++ b/tools/nitpick/src/ui/Nitpick.h @@ -18,7 +18,6 @@ #include "../Downloader.h" #include "../Test.h" -#include "HelpWindow.h" #include "../TestRunner.h" #include "../AWSInterface.h" @@ -116,8 +115,6 @@ private: bool _isRunningFromCommandline{ false }; - HelpWindow _helpWindow; - void* _caller; }; diff --git a/tools/nitpick/src/ui/Nitpick.ui b/tools/nitpick/src/ui/Nitpick.ui index 5e20e75553..78f7dcf2bf 100644 --- a/tools/nitpick/src/ui/Nitpick.ui +++ b/tools/nitpick/src/ui/Nitpick.ui @@ -803,7 +803,7 @@ 0 0 720 - 22 + 21 @@ -843,7 +843,7 @@ - Content + Online readme diff --git a/tools/unity-avatar-exporter/Assets/Editor.meta b/tools/unity-avatar-exporter/Assets/Editor.meta index aac82b4258..cf7dcf12dd 100644 --- a/tools/unity-avatar-exporter/Assets/Editor.meta +++ b/tools/unity-avatar-exporter/Assets/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51b3237a2992bd449a58ade16e52d0e0 +guid: 02111c50e71dd664da8ad5c6a6eca767 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs index 18916267f0..b6470a7551 100644 --- a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs +++ b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs @@ -85,9 +85,9 @@ class AvatarExporter : MonoBehaviour { {"LeftHandRing3", new Quaternion(-0.4936301f, 0.5097645f, -0.5061787f, -0.4901562f)}, {"LeftHandRing2", new Quaternion(-0.5089865f, 0.4943658f, -0.4909532f, -0.5054707f)}, {"LeftHandRing1", new Quaternion(-0.5020972f, 0.5005084f, -0.4979034f, -0.4994819f)}, - {"LeftHandThumb3", new Quaternion(-0.7228092f, 0.2988393f, -0.4472938f, -0.4337862f)}, - {"LeftHandThumb2", new Quaternion(-0.7554525f, 0.2018595f, -0.3871402f, -0.4885356f)}, - {"LeftHandThumb1", new Quaternion(-0.7276843f, 0.2878546f, -0.439926f, -0.4405459f)}, + {"LeftHandThumb3", new Quaternion(-0.6617184f, 0.2884935f, -0.3604706f, -0.5907297f)}, + {"LeftHandThumb2", new Quaternion(-0.6935627f, 0.1995147f, -0.2805665f, -0.6328092f)}, + {"LeftHandThumb1", new Quaternion(-0.6663674f, 0.278572f, -0.3507071f, -0.5961183f)}, {"LeftEye", new Quaternion(-2.509889e-9f, -3.379446e-12f, 2.306033e-13f, 1f)}, {"LeftFoot", new Quaternion(0.009215056f, 0.3612514f, 0.9323555f, -0.01121602f)}, {"LeftHand", new Quaternion(-0.4797408f, 0.5195366f, -0.5279632f, -0.4703038f)}, @@ -110,9 +110,9 @@ class AvatarExporter : MonoBehaviour { {"RightHandRing3", new Quaternion(0.4933217f, 0.5102056f, -0.5064691f, 0.4897075f)}, {"RightHandRing2", new Quaternion(0.5085972f, 0.494844f, -0.4913519f, 0.505007f)}, {"RightHandRing1", new Quaternion(0.502959f, 0.4996676f, -0.4970418f, 0.5003144f)}, - {"RightHandThumb3", new Quaternion(0.7221864f, 0.3001843f, -0.4482129f, 0.4329457f)}, - {"RightHandThumb2", new Quaternion(0.755621f, 0.20102f, -0.386691f, 0.4889769f)}, - {"RightHandThumb1", new Quaternion(0.7277303f, 0.2876409f, -0.4398623f, 0.4406733f)}, + {"RightHandThumb3", new Quaternion(0.6611374f, 0.2896575f, -0.3616535f, 0.5900872f)}, + {"RightHandThumb2", new Quaternion(0.6937408f, 0.1986776f, -0.279922f, 0.6331626f)}, + {"RightHandThumb1", new Quaternion(0.6664271f, 0.2783172f, -0.3505667f, 0.596253f)}, {"RightEye", new Quaternion(-2.509889e-9f, -3.379446e-12f, 2.306033e-13f, 1f)}, {"RightFoot", new Quaternion(-0.009482829f, 0.3612484f, 0.9323512f, 0.01144584f)}, {"RightHand", new Quaternion(0.4797273f, 0.5195542f, -0.5279628f, 0.4702987f)}, @@ -482,6 +482,7 @@ class ExportProjectWindow : EditorWindow { const int BUTTON_FONT_SIZE = 16; const int LABEL_FONT_SIZE = 16; const int TEXT_FIELD_FONT_SIZE = 14; + const int TEXT_FIELD_HEIGHT = 20; const int ERROR_FONT_SIZE = 12; string projectName = ""; @@ -508,6 +509,7 @@ class ExportProjectWindow : EditorWindow { labelStyle.fontSize = LABEL_FONT_SIZE; GUIStyle textStyle = new GUIStyle(GUI.skin.textField); textStyle.fontSize = TEXT_FIELD_FONT_SIZE; + textStyle.fixedHeight = TEXT_FIELD_HEIGHT; GUIStyle errorStyle = new GUIStyle(GUI.skin.label); errorStyle.fontSize = ERROR_FONT_SIZE; errorStyle.normal.textColor = Color.red; diff --git a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta index c71e4c396d..373aecc6a8 100644 --- a/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta +++ b/tools/unity-avatar-exporter/Assets/Editor/AvatarExporter.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c7a34be82b3ae554ea097963914b083f +guid: 00403fdc52187214c8418bc0a7f387e2 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/tools/unity-avatar-exporter/Assets/README.txt b/tools/unity-avatar-exporter/Assets/README.txt index 034ec23982..3ca4dbb1ee 100644 --- a/tools/unity-avatar-exporter/Assets/README.txt +++ b/tools/unity-avatar-exporter/Assets/README.txt @@ -1,15 +1,19 @@ +Note: It is recommended to use Unity versions between 2017.4.17f1 and 2018.2.12f1 for this Avatar Exporter. + To create a new avatar project: -1. Import your .fbx avatar model into Unity Assets (drag and drop file into Assets window or use Assets menu > Import New Assets). -2. Select the .fbx avatar that you imported in the Assets window, and in the Rig section of the Inspector window set the Animation Type to Humanoid and choose Apply. -3. With the .fbx avatar still selected, select High Fidelity menu > Export New Avatar. +1. Import your .fbx avatar model into your Unity project's Assets by either dragging and dropping the file into the Assets window or by using Assets menu > Import New Assets. +2. Select the .fbx avatar that you imported in step 1 in the Assets window, and in the Rig section of the Inspector window set the Animation Type to Humanoid and choose Apply. +3. With the .fbx avatar still selected in the Assets window, choose High Fidelity menu > Export New Avatar. 4. Select a name for your avatar project (this will be used to create a directory with that name), as well as the target location for your project folder. 5. Once it is exported, your project directory will open in File Explorer. To update an existing avatar project: 1. Select the existing .fbx avatar in the Assets window that you would like to re-export. -2. Select High Fidelity menu > Update Existing Avatar and choose the .fst file you would like to update. -3. If the .fbx file in your Unity Assets folder is newer than the existing .fbx file in your avatar project or vice-versa, you will be prompted if you wish to replace the older file with the newer file. +2. Choose High Fidelity menu > Update Existing Avatar and browse to the .fst file you would like to update. +3. If the .fbx file in your Unity Assets folder is newer than the existing .fbx file in your selected avatar project or vice-versa, you will be prompted if you wish to replace the older file with the newer file before performing the update. 4. Once it is updated, your project directory will open in File Explorer. * WARNING * If you are using any external textures as part of your .fbx model, be sure they are copied into the textures folder that is created in the project folder after exporting a new avatar. + +For further details including troubleshooting tips, see the full documentation at https://docs.highfidelity.com/create-and-explore/avatars/create-avatars/unity-extension diff --git a/tools/unity-avatar-exporter/Assets/README.txt.meta b/tools/unity-avatar-exporter/Assets/README.txt.meta index d8bc5b9b66..148fd21fdd 100644 --- a/tools/unity-avatar-exporter/Assets/README.txt.meta +++ b/tools/unity-avatar-exporter/Assets/README.txt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 71e72751b2810fc4993ff53291c430b6 +guid: 30b2b6221fd08234eb07c4d6d525d32e TextScriptImporter: externalObjects: {} userData: diff --git a/tools/unity-avatar-exporter/avatarExporter.unitypackage b/tools/unity-avatar-exporter/avatarExporter.unitypackage index f333aecb12..28052efea5 100644 Binary files a/tools/unity-avatar-exporter/avatarExporter.unitypackage and b/tools/unity-avatar-exporter/avatarExporter.unitypackage differ diff --git a/tools/unity-avatar-exporter/packager.bat b/tools/unity-avatar-exporter/packager.bat index 55b59a9db6..66629783af 100644 --- a/tools/unity-avatar-exporter/packager.bat +++ b/tools/unity-avatar-exporter/packager.bat @@ -1 +1 @@ -"C:\Program Files\Unity\Editor\Unity.exe" -quit -batchmode -projectPath %CD% -exportPackage "Assets" "avatarExporter.unitypackage" +Unity -quit -batchmode -projectPath %CD% -exportPackage "Assets" "avatarExporter.unitypackage"