Example #1
0
        public static bool TryGetSoftlockCount(UnityEngine.Object objectWithGUID, out int count)
        {
            string assetGuid = null;

            AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGuid);
            return(SoftLockData.TryGetSoftlockCount(assetGuid, out count));
        }
Example #2
0
        public static bool TryHasSoftLocks(UnityEngine.Object objectWithGUID, out bool hasSoftLocks)
        {
            string assetGuid = null;

            AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGuid);
            return(SoftLockData.TryHasSoftLocks(assetGuid, out hasSoftLocks));
        }
Example #3
0
        public static List <string> GetLockNamesOnObject(UnityEngine.Object objectWithGUID)
        {
            string assetGuid = null;

            AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGuid);
            return(SoftLockUIData.GetLocksNamesOnAsset(assetGuid));
        }
        // Provides the number of additional users editing the given object.
        // Failure: assigns 0 to count, return false.
        // Success: assigns a value in [0, n] to count, returns true.
        public static bool TryGetSoftlockCount(UnityEngine.Object objectWithGUID, out int count)
        {
            string assetGUID = null;

            AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGUID);
            bool success = TryGetSoftlockCount(assetGUID, out count);

            return(success);
        }
        // The usernames of additional people editing the given 'objectWithGUID'.
        // Defaults to an empty list.
        public static List <string> GetLockNamesOnObject(UnityEngine.Object objectWithGUID)
        {
            string assetGUID = null;

            AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGUID);
            List <string> names = GetLocksNamesOnAsset(assetGUID);

            return(names);
        }
        private static bool TryGetLocksOnObject(UnityEngine.Object objectWithGUID, out List <SoftLock> softLocks)
        {
            bool   success   = false;
            string assetGUID = null;

            if (AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGUID))
            {
                success = TryGetLocksOnAssetGUID(assetGUID, out softLocks);
            }
            else
            {
                softLocks = new List <SoftLock>();
            }
            return(success);
        }
Example #7
0
        private static bool TryGetLocksOnObject(UnityEngine.Object objectWithGUID, out List <SoftLock> softLocks)
        {
            bool   result    = false;
            string assetGuid = null;

            if (AssetAccess.TryGetAssetGUIDFromObject(objectWithGUID, out assetGuid))
            {
                result = SoftLockData.TryGetLocksOnAssetGUID(assetGuid, out softLocks);
            }
            else
            {
                softLocks = new List <SoftLock>();
            }
            return(result);
        }